├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── grammars ├── irev.cson ├── lcb.cson └── livecodescript.cson ├── lib └── main.coffee ├── package.json ├── settings └── language-livecode.cson ├── snippets ├── language-livecode.cson ├── livecode.cson └── revigniter.cson └── tools ├── GenerateSnippets.livecodescript └── Linter.lc /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.7.0 - Upgrade to Linter V2 2 | * Linting is broken since the release of Linter 2. Adjusted 3 | lib/main.coffee and package.json accordingly. (PR #37) 4 | * Corrected scope for highlighting in mixed (HTML/iRev) 5 | environment. (PR #38) 6 | * Adjusted revIgniter grammar and snippets to revIgniter modifications 7 | up to version 2.1.0. (PR #39) 8 | * Updated indent rules (PR #35) 9 | 10 | ## 0.6.1 - Improvements to documentation and LiveCode Script support 11 | * Revised, expanded and generally improved documentation (issue #19) 12 | * Improved LiveCode Script support 13 | * Support for `if...then...else...` syntax 14 | * Better indentation in `switch` blocks 15 | * Restore completion of symbols from the current file (issue #18) 16 | * Don't clobber autocomplete settings (issue #16) 17 | * Improved variable & constant capturing 18 | * Restored support for linting revIgniter files 19 | 20 | ## 0.6.0 - Linting and script-only stacks 21 | * LiveCode Script grammar and snippets generated from documentation 22 | * Support for script-only stacks (`.livecodescript`) 23 | * Linting & syntax checking for LiveCode Script files 24 | * Initial linting support for LiveCode Builder source files 25 | 26 | ## 0.5.1 - Minor documentation updates 27 | 28 | ## 0.5.0 - Added LiveCode server support 29 | * Merged with the "revigniter-livecode" package for Atom 30 | * Added support for LiveCode server script files (`.lc` and `.irev`) 31 | * Greatly-improved LCB autocomplete support 32 | * Correctly suggest handler, variable, constant, and type names, and known 33 | keywords 34 | * Minor LCB syntax highlighting bugfixes 35 | 36 | Thanks to Adam Robertson for converting LiveCode server support from the 37 | original TextMate grammars. 38 | 39 | ## 0.3.0 - Snippet support 40 | * Add basic snippets for commonly-used blocks. These work with Atom's new 41 | built-in autocomplete support. 42 | * "if" and "if … else" 43 | * "repeat" 44 | * "handler" 45 | * "module", "library" and "widget" 46 | * Minor syntax highlighting bugfix 47 | 48 | ## 0.2.0 - Updates to LCB syntax highlighting 49 | * Add detection of "metadata" and "property" declarations 50 | * Add "undefined" and "the empty " as language constants 51 | * Various minor improvements and bug fixes 52 | 53 | ## 0.1.0 - Initial development preview 54 | * Basic support for LiveCode Builder 55 | * Syntax highlighting 56 | * Indentation rules for "if", "handler" and "repeat" blocks 57 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | {one line to give the program's name and a brief idea of what it does.} 635 | Copyright (C) {year} {name of author} 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | {project} Copyright (C) {year} {fullname} 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | 676 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LiveCode language package for Atom 2 | 3 | ![LiveCode Community Logo](http://livecode.com/wp-content/uploads/2015/02/livecode-logo.png) 4 | 5 | This is a language package that lets you edit [LiveCode](http://livecode.com/) 6 | source code in the Atom editor. It adds support for: 7 | 8 | * LiveCode Builder source code (`.lcb`) 9 | * LiveCode server source code (`.lc` and `.irev`) 10 | * LiveCode script-only stacks (`.livecodescript`) 11 | 12 | ## Installing 13 | 14 | Using the Atom package manager: 15 | 16 | * Visit Atom's "Settings" view, and go to the "Install" tab 17 | * Use the search field to search for the **language-livecode** package 18 | * Click "Install" 19 | 20 | See also the [Atom Packages](https://atom.io/docs/v1.0.19/using-atom-atom-packages) 21 | section in the Atom Flight Manual for more info, including how to install 22 | packages from the command line. 23 | 24 | ## Configuration 25 | 26 | The settings for LiveCode integration can also be modified using Atom's 27 | "Settings" view. Go to the "Packages" tab, find the **language-livecode** 28 | package, and click its "Settings" button. 29 | 30 | See also the 31 | [Package Settings](https://atom.io/docs/v1.0.19/using-atom-atom-packages#package-settings) 32 | section in the Atom Flight Manual. 33 | 34 | ## Usage 35 | 36 | **language-livecode** integrates LiveCode editing into the Atom editor. Note 37 | that it doesn't make Atom behave like the LiveCode IDE, and it doesn't 38 | integrate with or replace the LiveCode IDE's script editor. 39 | 40 | ### Syntax highlighting and indentation 41 | 42 | The package adds automatic syntax highlighting and indentation for all of the 43 | supported LiveCode language types. 44 | 45 | The optional [revigniter-syntax](https://atom.io/themes/revigniter-syntax) 46 | can be installed to provide a colour theme that's tailored for LiveCode source 47 | code. 48 | 49 | ### Autocompletion 50 | 51 | The package also includes autocompletion support for symbols in the current 52 | file, along with snippets for many common LiveCode Builder and LiveCode Script 53 | syntax elements. 54 | 55 | ### Script error checking ("linting") 56 | 57 | If you have the [linter](https://atom.io/packages/linter) package installed, 58 | you can enable script error checking support. This highlights and describes 59 | script compilation errors as you work. 60 | 61 | ![Linter in action](http://ecove.on-rev.com/linter.gif) 62 | 63 | #### LiveCode Script linting 64 | 65 | You will need to 66 | [download LiveCode server](https://downloads.livecode.com/livecode) and install 67 | (by unzipping it somewhere appropriate). LiveCode Server 7.1.0 or later is 68 | required. 69 | 70 | Next, go to the package settings and put the full path to the LiveCode server 71 | program that you just extracted (e.g. `/path/to/livecode-community-server`) 72 | into the "LiveCode Server Engine Path" setting. 73 | 74 | It's often useful to enable the "Explicit Variables" setting to get an error 75 | when you use a variable name that you haven't declared with `local` or 76 | `global`. 77 | 78 | **Note:** When checking LiveCode Server source files, the linter will only 79 | check for errors in the file currently being edited. If, for example, the file 80 | you're editing includes another file and that inclusion causes a variable 81 | re-declaration error, the linter will not detect it. 82 | 83 | #### LiveCode Builder linting 84 | 85 | **Warning:** Linting for LiveCode Builder source code is **experimental**. 86 | 87 | You need LiveCode 8 installed to use LiveCode Builder linting. The LiveCode 88 | IDE's installation location contains the LiveCode Builder compiler, called 89 | **lc-compile**. In the package settings, set the "Compiler Path for LiveCode 90 | Builder" to the full path to the compiler (e.g. `/path/to/lc-compile`). 91 | 92 | The LiveCode Builder compiler also needs to know where to find the `.lci` 93 | interface files which provide the built-in modules' interface information. 94 | These are usually located in a `modules` directory near the **lc-compile** 95 | program in the LiveCode IDE's installation location. You should put this 96 | path in the "Module Paths For LiveCode Builder" setting. 97 | 98 | If you are working on a complex project and you need **lc-compile** to look for 99 | `.lci` files in multiple places, you can put multiple paths in the "Module 100 | Paths for LiveCode Builder" setting, separated by `;` characters. 101 | 102 | **Notes:** The linting step will automatically create a `.lci` working 103 | directory in the directory where the LCB file is located. The linter puts the 104 | interface files for the files that are being linted in that directory. You may 105 | get dependency errors if you edit an LCB module which has dependencies before 106 | editing the module that it depends on, because the `.lci` working directory 107 | will have missing interface files. 108 | 109 | ## Authors 110 | 111 | * Ralf Bitter 112 | * Peter Brett 113 | * Monte Goulding 114 | * Adam Robertson 115 | 116 | The LiveCode server syntax and revIgniter snippets were converted from the 117 | TextMate bundles available from the [revIgniter](http://revigniter.com/) 118 | website. 119 | 120 | ## Reporting bugs and contributing 121 | 122 | Please report any problems to the [GitHub issues tracker]( https://github.com/livecode/atom-language-livecode/issues). 123 | -------------------------------------------------------------------------------- /grammars/irev.cson: -------------------------------------------------------------------------------- 1 | fileTypes: [ 2 | "irev" 3 | "lc" 4 | ] 5 | firstLineMatch: "^<\\?rev\\b|<\\?lc\\b|<\\?livecode\\b" 6 | foldingStartMarker: "(/\\*)|(^\\s*\\b(on|command|function|repeat|if|switch)\\s+(\\w+|\\(\\.*))|(^\\s+?try$)" 7 | foldingStopMarker: "(\\*/)|^\\s*\\b(end\\s+(?!if|repeat)\\w+|(end\\s+(repeat|if|switch|try)))" 8 | injections: 9 | "text.html.iRev": 10 | patterns: [ 11 | { 12 | begin: "<\\?rev" 13 | end: "\\?>" 14 | patterns: [ 15 | { 16 | include: "#language" 17 | } 18 | ] 19 | } 20 | { 21 | begin: "(((?<=\\?>)<)|<)\\?(?i:rev)?" 22 | beginCaptures: 23 | "0": 24 | name: "punctuation.section.embedded.begin.iRev" 25 | "2": 26 | name: "meta.consecutive-tags.iRev" 27 | comment: "Catches embeded irev code." 28 | end: "(\\?)>" 29 | endCaptures: 30 | "0": 31 | name: "punctuation.section.embedded.end.iRev" 32 | "1": 33 | name: "source.iRev" 34 | name: "source.iRev.embedded.line.html" 35 | patterns: [ 36 | { 37 | include: "#language" 38 | } 39 | ] 40 | } 41 | ] 42 | name: "iRev" 43 | patterns: [ 44 | { 45 | include: "text.html.basic" 46 | } 47 | { 48 | include: "source.livecodescript" 49 | } 50 | { 51 | include: "#revigniter" 52 | } 53 | ] 54 | repository: 55 | revigniter: 56 | patterns: [ 57 | { 58 | match: "(?i)\\b(_rigAgentData|_rigAuth(GenerateOTPuserKey|SetHash|Where)+|_rigBuild(Headers|Message)+|_rigCompileData|_rigDataFromSmtpSocket|_rigDisplay|_rigExplodeSegments|_rigFetchResultArray|_rigFlashdata(Mark|Sweep)+|_rigFormValidExecute|_rigGetSmtpData|_rigHaving|_rigInitHooksPrefs|_rigLike|_rigMaxMinAvgSum|_rigMergeCache|_rigOTPstrPad|_rigParseRoutes|_rigRemove(NlCallback|UrlSuffix)+|_rigReset(PostArray|Select|Write)+|_rig(Autoloader|Initialize|InitLibrary|LoadLibrary|LoadStack|Scaffolding)+|_rigSanitizeGlobals|_rigSend(SmtpCommand|SmtpData)+|_rigSessGC|_rigSet(Boundaries|Charsets|Cookie|ErrorMessage|Header|Languages|Pragma|Request|Routing|Scaffolding|ScaffoldingTable|TableData|ViewPath)+|_rigSmtp(Authenticate|Connect|DataWritten)+|_rigUnwrapSpecials|_rigWhere(In)*|_rigWrite(Cache|Headers)+|rigAdd(TableRow|ToLibArray)+|rigAddValidation(Grp|Rules)+|rigAjaxPagination|rigAlpha(DashR|NumericR|R)+|rigAppendOutput|rigAuth(Logout|SetErrorDelimiters|SetMessageDelimiters)+|rigClear(Mail|TableVars)+|rigCompile(ProfilerTemplate|TableTemplate)+|rigDBcache|rigDb(CacheDelete|CacheDeleteAll|CacheSetPath|CloseParenthesis|DisplayError|Distinct|Driver|FlushCache|From|GroupBy|Having|Join|Like|Limit|NotLike|Offset|OpenParenthesis|OrderBy|OrHaving|OrLike|OrNotLike|OrWhere|OrWhereIn|OrWhereNotIn|ResetResultValue|Select|SetResultFromCache|SetRow|StartCache|StopCache|TransOff|TransStart|TransStrict|Where|WhereIn|WhereNotIn)+|rigDelete(AllDBcacheFiles|Cookie|DBcacheFiles|Files)+|rigDo(Exception|Upload)+|rigEnableProfiler|rigEncodeRevTags|rigExactLengthR|rigFmSubstitute|rigForceDownload|rigFragmentDate|rigFtp(ChangeDir|Close|CreateFolder|DeleteFile|DeleteFolder|Download|ListFiles|Mirror|RenameMove|SetPermissions|Upload)+|rigHtmlSpecialChars|rigImage(NewSettings|Reproportion)+|rigImgClear|rigInit(Captcha|ializeCalendar|ializeFTP|ializeImage|ializeJquery|ializeMail|ializePagination|ializeUpload)+|rigIntegerR|rigIs(NaturalNoZeroR|NaturalR|NumericR)+|rigJQ(addStatement|ajax|ajaxForm|alert|animate|callFunction|cb|close|closeStatement|condition|confirm|delegateLiveOneToggleUnbind|dieUndelegate|eachClose|eachOpen|effect|eventAlert|eventAnim|eventClose|eventEffect|eventOpen|functionClose|functionOpen|hover|open|prompt|set|triggerTriggerhandler|var|xhRequest)+|rigKeepSessFlashdata|rigLoad(Config|erLoadLibrary|Extension|Extensions|Helper|Helpers|Language|Library|Model|Module|Plugin|Plugins|Rdriver|Scaffolding|Stack|Stacks|Vars)+|rigLog(Exception|Message)+|rigMail(Attach|Bcc|CC|From|Message|Subject|To)+|rigMatchesR|rigMaxLengthR|rigMd5|rigMinLengthR|rigNumericR|rigOTP(compareKeys|generate|generateUserKey)+|rigOutputCache|rigParseCalTemplate|rigPrep(ForForm|URL)+|rigRedirect|rigReplyTo|rigRequiredR|rigReset(Alternator|SmtpVars)+|rigRunInitial(CalendarConfig|CaptchaConfig|EncryptConfig|FormvalidationConfig|FtpConfig|ImageConfig|JqueryConfig|MailConfig|PaginationConfig|ProfilerConfig|SessionConfig|TableConfig|UploadConfig|UseragentConfig)+|rigScaff(Add|Delete|DoDelete|Edit|Insert|olding|Update|View)+|rigSelect(Avg|Max|Min|Sum)+|rigSess(Create|Destroy|MarkAsFlash|MarkAsTemp|Update|Write)+|rigSet(_sAltMessage|_sCrlf|_sMailtype|_sNewline|_sPriority|_sWordwrap|CaptchaMatrix|CaptchaNumberMatrix|Cipher|ConfigItem|ConfigRules|Controller|Cookie|DBdriverSetting|Directory|EmptyCellVal|EncryptionKey|ErrorDelimiters|Handler|Hash|Header|ImgError|InitialCalendarValue|InitialImageValue|InitialJqueryValue|InitialMailValue|InitialPaginationValue|Message|Output|ProfilerTableTemplate|Rules|SessFlashdata|SessTempdata|SessUserdata|StatusHeader|TableCaption|TableHeading|TableTemplate)+|rigSha(1|3)+|rigShow(404|404Page|Error)+|rigStripImageTags|rigSetPrefilledValues|rigTimeMark|rigTrans(Commit|Rollback)+|rigTrackbackSend(Error|Success)+|rigUnsetSessUserdata|rigUrlDecodeStr|rigValid(Base64R|EmailR|EmailsR|IpR)+|rigWriteLog|rigWriteManifest)\\b" 59 | name: "support.command.iRev" 60 | } 61 | { 62 | match: "(?i)\\b(_rigARarrayMerge|_rigAttributesToString|_rigAuth(CallHook|CurrentUserID|DecryptPassword|EncryptPassword|FilteredData|ForgottenPassword|LoginRememberedUser|RegisterUser|RunHook|UpdateLastLogin|ValidatePassword)+|_rigCacheInit|_rigCallHook|_rigCbName|_rigClean(InputData|InputKeys)+|_rigCloseDB|_rigCompactExplodedWords|_rigCompile(Benchmarks|ControllerInfo|Get|Post|Queries|Select|URIstring)+|_rigConnectString|_rigConvertAttribute|_rigCreateAliasFromTable|_rigDataSeek|_rigDb(Close|Execute|FieldData|ListColumns|ListTables|SetCharset|Version)+|_rigDefault(ProfilerTemplate|TableTemplate)+|_rigDelete|_rigEscapeIdentifiers|_rigExceptionHandler|_rigFetch(FromArray|ModuleSegment|UriString)+|_rigFilter(Attributes|Uri)+|_rigFromTables|_rigGet(AltMessage|ContentType|Hostname|MailEncoding|MessageID|MimeMessage|Pragma|Protocol|Time)+|_rigHasOperator|_rigHtml(EntityDecode|List)+|_rigInsert|_rigJs(ImgRemoval|LinkRemoval)+|_rigLimit|_rigLoadAgentFile|_rigMimeTypes|_rigOTP(base32Encode|base32Decode|calcHMAChex|chunk|hmacSha|oauthTotp|Sha|shiftRight)+|_rigOutDisplayCache|_rigParse(AssetHTML|Attributes|FormAttributes|QueryStr|URL)+|_rigPrep(Qencoding|Query|QuotedPrintable)+|_rigProtectIdentifiers|_rigReduceArray|_rigLoad|_rigRunHook|_rigSanitizeNaughtyHtml|_rigSend(WithMail|WithSendmail|WithSmtp)+|_rigSerializeSess|_rigSet(Browser|Date|Mobile|Platform|Robot)+|_rigSlashSegment|_rigSpoolEmail|_rigStrToArray|_rigTempMailPath|_rigTrackAliases|_rigTranslateFieldname|_rigTruncate|_rigUnserializeSess|_rigUpdate|_rigUriToAssoc|_rigValidate(QueryRequest|Request)+|_varPostFallback|_rigWriteImgSrcFile|_rigXor(Decode|Encode|Merge)+|rigAccept(Charset|Lang)+|rigAdd(Cslashes|Favicon|TrailingSlash)+|rigAdjustDate|rigAgent(CharSets|Languages|Platform|String)+|rigAjaxPaginationCode|rigAlternator|rigAnchor|rigAnchorPopUp|rigArray(Element|Keys|Merge|RandElement|Reverse|Splice|Values)+|rigASiteURL|rigAssocToURI|rigAuth(Activate|ChangePassword|ClearForgottenPasswordCode|ClearLoginAttempts|ClearOTP|Deactivate|DeleteUser|EmailCheck|Errors|FetchConfigItem|ForgottenPassword|ForgottenPasswordCheck|ForgottenPasswordCode|GenerateQR|GetAttemptsNum|Group|Groups|IdentityCheck|IncreaseLoginAttempts|InGroup|IsAdmin|IsMaxLoginAttemptsExceeded|LoggedIn|Login|Messages|MessageDelimiters|OTPkeysMatch|Register|RemoveFromGroup|ResetPassword|Update|User|UserGroups|Users|UserHasOTP|UsernameCheck)+|rigAutoLink|rigBaseURL|rigBatchBccSend|rigBrowser(Version)*|rigCacheVarsMerged|rigCalGenerate|rigCanWriteFileTo|rigCaptcha(Code|Style|MathProblem)+|rigCeil|rigCheck(CachePath|Type)+|rigClean(Email|MailAddress)+|rigCodepointToNum|rigCompileBinds|rigConfigItem|rigCookieExpirationDate|rigCreatePaginationLinks|rigCssAsset(URL)*|rigCurrent(URIstring|URL)+|rigDay(OfYear|sInMonth)+|rigDB(result)*|rigDb(AffectedRows|CacheOff|CacheOn|Connect|CountAll|CountAllResults|CurrentRow|Delete|ElapsedTime|EmptyTable|ErrorMessage|Escape|EscapeString|FieldData|FieldExists|FirstRow|Get|GetWhere|Initialize|Insert|InsertString|LastQuery|LastRow|ListFields|ListTables|NextRow|Platform|Prefix|Query|Row|RowArray|SetCharset|SimpleQuery|TableExists|TotalQueries|TransStatus|Truncate|Update|UpdateString|ValuesSet|Version)+|rigDecode|rigDefaultCalTemplate|rigDisplay(ImgErrors|UploadErrors)+|rigDynamic(CssAsset|GalleriaData)+|rigElapsedTime|rigElementsList|rigEncode|rigEscape(LikeStr|Str)+|rigExplodeImgName|rigFetch(ActiveGroup|AgentsData|AllMimeTypes|ConfigItem|Controller|ControllerHandler|ControllerMethods|DBactiveRecSetting|DBdriverSetting|DBlibLoaded|DBsetting|DBsettingsAll|Directory|DocTypes|DriverSpecificSetting|Markers|MimeType|Rsegment|Scaffolding|ScaffoldingTable|Segment)+|rigFieldData|rigFile(_get_contents|Info|NameFromPath|NameSecurity)+|rigFilter(Dots|edFiles|edFilesWithPaths|edFolders|edFoldersWithPaths|FolderDots)+|rigForm(Button|Checkbox|Close|DropDown|Error|Fieldset|FieldsetClose|Hidden|Input|Label|Mail|MailReplace|Multiselect|Open|OpenMultiPart|Password|Prep|Radio|Textarea|Upload|ValidError|ValidErrorString|ValidRun|ValidSelectCheckboxRadio|ValidSetCheckbox|ValidSetRadio|ValidSetSelect|ValidSetValue)+|rigFtpPrintDebugger|rigGalleriaData|rigGenerateTable|rigGet(CaptchaHash|CaptchaNum|Config|Cookie|Cookies|DayNames|DirFileInfo|EncryptionKey|FileInfo|FileNames|ImageProperties|MimeByExtension|MonthName|Output|TotalDays)+|rigHash|rigHelperIsLoaded|rigHexDigest|rigHtml(Br|DocType|Heading|Img|JsLink|LinkTag|Meta|Nbs|OL|SpecialChars|UL)+|rigImage(Asset|Crop|ProcessImagemagick|Resize|Rotate|SourceFile|SourceTag|Watermark)+|rigGmtToLocal|rigHumanToTimestamp|rigImgAssetURL|rigIM(knownFonts|version)+|rigImplode|rigInArray|rigIndexPage|rigIpAddress|rigIs(Browser|MainConfigLoaded|LeapYear|Mobile|NumberedArray|Referral|Robot|WriteType)+|rigJQ(ajaxR|alertR|animateR|closeStatementR|conditionR|confirmR|eachCloseR|eachOpenR|effectR|getR|promptR|readyClose|readyOpen|setR|uerySource|varR|xhRequestR)+|rigJs(Asset|AssetURL|ScriptClose|ScriptOpen)+|rigJWT(encode|decode)+|rigLang(LangLine|Line|LoadLang)+|rigLibIsLoaded|rigList(Fields|Files|FilesWithPaths|FoldersWithPaths)+|rigLoad(ConfigFile|Database|File|ScaffoldingLanguage|View)+|rigLocalToGMT|rigMail(Send|ToLink|ValidEmail)+|rigMakeTableColumns|rigMarkdown|rigMarkdown(Available|Version)+|rigMdate|rigMemoryUsage|rigNonce|rigMobile|rigModuleUriToAssoc|rigMysqlTimeToSeconds|rigNativeCharToNum|rigNl2br|rigNow|rigNum(ber_format|Fields|Rows|ToCodepoint|ToNativeChar)+|rigOtherAssetURL|rigOTP(qrCode|validBase32Str)+|rigOverlayWatermark|rigParseRequestUri|rigPathWithoutFileName|rigPreg(Quote|Replace)+|rigPrimary|rigPrintMailDebugger|rigProfilerOutput|rigProtectIdentifiers|rigQ|rigQueryToJSON|rigQueryValues|rigQuotesToEntities|rigRandom(CaptchaNum|Num|String)+|rigRawURLdecode|rigRead(BinFile|File|SQLcache)+|rigReduce(DoubleSlashes|Multiples)+|rigReferrer|rigRemoveInvisibleCharacters|rigRepeater|rigResetButton|rigCaptcha|rigRobot|rigRSegmentArray|rigRTrim|rigRunModule|rigRuri(String|ToAssoc)+|rigSafeMailToLink|rigScaffoldingRequest|rigSegmentArray|rigSendEmail|rigSess(AllUserdata|Flashdata|Read|Tempdata|Userdata)+|rigSet(Checkbox|Radio|Select|SelectCheckboxRadio|Value)+|rigShellEscape|rigShowErrorPage|rigSite(Links|URL)+|rigSlash(Item|Rsegment|Segment)+|rigSqlDateTimeToIntDate|rigStandardDate|rigStrip(_slashes|HTML|ImgTags|Quotes|Slashes)+|rigSubmitButton|rigSubstr(ToNum)*|rigSymbolicPermissions|rigSystemURL|rigText(Watermark|Decode)+|rigTime(span|stampToHuman|zoneMenu|zones)+|rigTotal(Rsegments|Segments)+|rigTrackback(Data|DisplayErrors|HasLink|Receive|Send)+|rigTrans(Begin|Complete|latedDateItem)+|rigTrim(Slashes)*|rigUcwords|rigUnwrappedWrapMarkersString|rigUploadData|rigUri(Adjusted|String|ToAssoc)+|rigUrl(Prep|Title|stripSpace)+|rigUserAgent|rigValid(ateEmail|ationErrors|CaptchaUserInput|Email|IP)+|rigVar(Cookie|Get|GetPost|Post|Server)+|rigWeekOfYear|rigWord(_wrap|Wrap)+|rigWrite(File|SQLcache)+|rigXmlConvert|rigXss(Clean|Hash)+)\\b" 63 | name: "support.function.iRev" 64 | } 65 | ] 66 | scopeName: "source.iRev" 67 | -------------------------------------------------------------------------------- /grammars/lcb.cson: -------------------------------------------------------------------------------- 1 | # If this is your first time writing a language grammar, check out: 2 | # - http://manual.macromates.com/en/language_grammars 3 | 4 | 'scopeName': 'source.lcb' 5 | 'name': 'LiveCode Builder' 6 | 'fileTypes': [ 7 | 'lcb' 8 | ] 9 | 'patterns': [ 10 | { 11 | 'include': '#comment-line' 12 | } 13 | { 14 | 'include': '#comment-block' 15 | } 16 | { 17 | 'include': '#string' 18 | } 19 | { 20 | 'include': '#if' 21 | } 22 | { 23 | 'include': '#repeat-block' 24 | } 25 | { 26 | 'match': '\\s*(next|exit|end)\\s*repeat\\b' 27 | 'name': 'keyword.control.repeat.lcb' 28 | } 29 | { 30 | 'include': '#end-block' 31 | } 32 | { 33 | 'include': '#define-module' 34 | } 35 | { 36 | 'include': '#define-constant' 37 | } 38 | { 39 | 'include': '#define-metadata' 40 | } 41 | { 42 | 'include': '#define-property' 43 | } 44 | { 45 | 'include': '#define-variable' 46 | } 47 | { 48 | 'include': '#define-handler' 49 | } 50 | { 51 | 'include': '#handler-return' 52 | } 53 | { 54 | 'include': '#brackets' 55 | } 56 | { 57 | 'match': '\\b(true|false|nothing|undefined|any|the\\s*empty\\s*(array|list|string|data))\\b' 58 | 'captures': 59 | '1': 60 | 'name': 'constant.language.core.lcb' 61 | } 62 | { 63 | 'match': '\\b([tpsmxr][A-Z]\\w*)\\b' 64 | 'captures': 65 | '1': 66 | 'name': 'variable.lcb' 67 | } 68 | { 69 | 'match': '\\b(k[A-Z]\\w*)\\b' 70 | 'captures': 71 | '1': 72 | 'name': 'variable.other.constant.lcb' 73 | } 74 | { 75 | 'match': '\\b(returns)\\b' 76 | 'captures': 77 | '1': 78 | 'name': 'storage.modifier.returns.lcb' 79 | } 80 | { 81 | 'match': '\\b(Number|Integer|Real|Boolean|String|List|Array)\\b' 82 | 'captures': 83 | '1': 84 | 'name': 'support.type.core.lcb' 85 | } 86 | ] 87 | 88 | 'repository': 89 | 90 | 'comment-line': 91 | 'begin': '--' 92 | 'beginCaptures': 93 | '0': 94 | 'name': 'punctuation.definition.comment.double-dash.lcb' 95 | 'end': '\\n' 96 | 'name': 'comment.line.lcb' 97 | 98 | 'comment-block': 99 | 'begin': '/\\*' 100 | 'captures': 101 | '0': 102 | 'name': 'punctuation.definition.comment.lcb' 103 | 'end': '\\*/' 104 | 'name': 'comment.block.lcb' 105 | 106 | 'string': 107 | 'begin': '"' 108 | 'beginCaptures': 109 | '0': 110 | 'name': 'punctuation.definition.string.begin.lcb' 111 | 'end': '"' 112 | 'endCaptures': 113 | '0': 114 | 'name': 'punctuation.definition.string.end.lcb' 115 | 'name': 'string.quoted.double.lcb' 116 | 117 | 'if': 118 | 'begin': '^\\s*(else\\s*if|if|else)\\b' 119 | 'captures': 120 | '1': 121 | 'name': 'keyword.control.if.lcb' 122 | 'end': '\\b(then)\\b' 123 | 'patterns': [ 124 | { 125 | 'include': '$self' 126 | } 127 | ] 128 | 129 | 'end-block': 130 | 'match': '^\\s*(end(?:\\s*(?:module|library|widget|handler|if|repeat))?)' 131 | 'name': 'keyword.control.end.lcb' 132 | 133 | 'repeat-block': 134 | 'match': '^\\s*(repeat)\\b' 135 | 'name': 'keyword.control.repeat.lcb' 136 | 137 | 'define-module': 138 | 'match': '^\\s*(module|library|widget|use)(\\s+(?:\\w|[._])*)?\\b' 139 | 'captures': 140 | '1': 141 | 'name': 142 | 'keyword.other.module.lcb' 143 | '2': 144 | 'name': 145 | 'entity.name.module.lcb' 146 | 147 | 'define-constant': 148 | 'begin': '^\\s*constant\\b' 149 | 'end': '\\bis\\b' 150 | 'captures': 151 | '0': 152 | 'name': 'storage.type.constant.lcb' 153 | 'patterns': [ 154 | { 155 | 'match': '\\b\\w+\\b' 156 | 'name': 'variable.other.constant.lcb' 157 | } 158 | ] 159 | 160 | 'define-metadata': 161 | 'begin': '^\\s*metadata\\b' 162 | 'end': '\\bis\\b' 163 | 'captures': 164 | '0': 165 | 'name': 'storage.type.metadata.lcb' 166 | 'patterns': [ 167 | { 168 | 'match': '\\b\\w+\\b' 169 | 'name': 'entity.name.metadata.lcb' 170 | } 171 | ] 172 | 173 | 'define-property': 174 | 'match': '^\\s*(property)(\\s*\\w*)?' 175 | 'captures': 176 | '1': 177 | 'name': 'storage.type.property.lcb' 178 | '2': 179 | 'name': 'entity.name.property.lcb' 180 | 181 | 'define-variable': 182 | 'match': '^\\s*((?:public|private)\\s+)?(variable)(?:\\s+(\\w*)(?:\\s+(as(?:\\soptional)?)(?:\\s+(\\w*))?)?)?' 183 | 'captures': 184 | '1': 185 | 'name': 'storage.modifier.access.lcb' 186 | '2': 187 | 'name': 'storage.type.var.lcb' 188 | '3': 189 | 'name': 'variable.lcb' 190 | '4': 191 | 'name': 'keyword.other.as.lcb' 192 | '5': 193 | 'name': 'entity.name.type.lcb' 194 | 195 | 'define-handler': 196 | 'match': '^\\s*((?:public|private)\\s+)?(handler)(?:\\s+(\\w+))\\b' 197 | 'captures': 198 | '1': 199 | 'name': 'storage.modifier.access.lcb' 200 | '2': 201 | 'name': 'storage.type.function.lcb' 202 | '3': 203 | 'name': 'entity.name.function.lcb' 204 | 205 | 'handler-return': 206 | 'match': '^\\s*return\\b' 207 | 'name': 'keyword.control.lcb' 208 | -------------------------------------------------------------------------------- /grammars/livecodescript.cson: -------------------------------------------------------------------------------- 1 | # If this is your first time writing a language grammar, check out: 2 | # - http://manual.macromates.com/en/language_grammars 3 | 4 | 'scopeName': 'source.livecodescript' 5 | 'name': 'LiveCode Script' 6 | 'fileTypes': [ 7 | 'livecodescript' 8 | ] 9 | 'firstLineMatch': '^#!.*\\b(livecode)|^#\\s*-\\*-[^*]*mode:\\s*livecodescript[^*]*-\\*-|script \"([A-Za-z_0-9]*)\"' 10 | 'patterns': [ 11 | { 12 | include: "#language" 13 | } 14 | ] 15 | repository: 16 | constants: 17 | patterns: [ 18 | { 19 | match: "(?i)\\b(SIX|TEN|FORMFEED|NINE|ZERO|NONE|SPACE|FOUR|FALSE|COLON|CRLF|PI|COMMA|ENDOFFILE|EOF|EIGHT|FIVE|QUOTE|EMPTY|ONE|TRUE|((?<=\\w\\s)RETURN)|CR|LINEFEED|RIGHT|BACKSLASH|NULL|SEVEN|TAB|THREE|TWO)\\b" 20 | name: "constant.language.livecodescript" 21 | } 22 | { 23 | match: "\\bk[A-Z]{1}.*?\\b" 24 | name: "constant.language.livecodescript" 25 | } 26 | ] 27 | language: 28 | patterns: [ 29 | { 30 | begin: "/\\*" 31 | captures: 32 | "0": 33 | name: "punctuation.definition.comment.livecodescript" 34 | end: "\\*/" 35 | name: "comment.block.livecodescript" 36 | } 37 | { 38 | 'begin': '--' 39 | 'beginCaptures': 40 | '0': 41 | 'name': 'punctuation.definition.comment.double-dash.livecodescript' 42 | 'end': '\\n' 43 | 'name': 'comment.line.livecodescript' 44 | } 45 | { 46 | 'begin': '#' 47 | 'beginCaptures': 48 | '0': 49 | 'name': 'punctuation.definition.comment.number-sign.livecodescript' 50 | 'end': '\\n' 51 | 'name': 'comment.line.livecodescript' 52 | } 53 | { 54 | 'begin': '//' 55 | 'beginCaptures': 56 | '0': 57 | 'name': 'punctuation.definition.comment.double-slash.livecodescript' 58 | 'end': '\\n' 59 | 'name': 'comment.line.livecodescript' 60 | } 61 | { 62 | match: "\\b(after|byte(s)*|codepoint(s)*|codeunit(s)*|english|segment(s)*|sentence(s)*|paragraph|the|trueWord(s)*|until|word(s)*|http|forever|descending|using|line|real8|with|seventh|for|stdout|finally|element|word|fourth|before|black|ninth|sixth|characters|chars|stderr|uInt(1|1s|2|2s)|stdin|string|lines|relative|rel|any|fifth|items|from|middle|mid|at|else|of|catch|then|third|it|file|milli(seconds|second|secs|sec)|int(1|1s|4|4s|ernet|2|2s)|normal|text|item|last|long|detailed|effective|uInt4|uInt4s|se(conds|cond|cs|c)|repeat|end\\s+repeat|URL|in|end\\s+try|into|switch|end\\s+switch|to|words|https|token|binfile|each|tenth|as|ticks|tick|system|real4|by|dateItems|without|cha(r|racter)|ascending|eighth|whole|dateTime|numeric|short|first|ftp|integer|abbreviated|abb(r|rev)|private|case|default|while|if|end\\s+if)\\b" 63 | name: "keyword.control.livecodescript" 64 | } 65 | { 66 | captures: 67 | "1": 68 | name: "keyword.control.exception.livecodescript" 69 | match: "\\b(catch)\\b\\s*([A-Za-z_][A-Za-z_0-9]*)" 70 | name: "meta.catch.livecodescript" 71 | } 72 | { 73 | match: "\\b(catch|try|throw)\\b" 74 | name: "keyword.control.exception.livecodescript" 75 | } 76 | { 77 | captures: 78 | "1": 79 | name: "storage.type.function.livecodescript" 80 | "2": 81 | name: "storage.type.function.livecodescript" 82 | "3": 83 | name: "entity.name.function.livecodescript" 84 | "4": 85 | name: "punctuation.definition.variable.livecodescript" 86 | match: "(private\\s+)*((?i)function|on|command|before|after)\\s+([A-Za-z_0-9-]+)(\\s+@*[A-Za-z_0-9-]+,*?\\s+.*)*" 87 | name: "meta.function.livecodescript" 88 | } 89 | { 90 | captures: 91 | "1": 92 | name: "storage.type.function.end.livecodescript" 93 | "2": 94 | name: "entity.name.end.function.livecodescript" 95 | match: "((?i)end){1}\\s+?([A-Za-z_0-9-]+)?" 96 | name: "meta.function.end.livecodescript" 97 | } 98 | { 99 | match: "(\\-|\\+|\\*|/|%)" 100 | name: "keyword.operator.arithmetic.livecodescript" 101 | } 102 | { 103 | match: "(?i)\\b(and|or)\\b" 104 | name: "keyword.operator.logical.livecodescript" 105 | } 106 | { 107 | match: "(?i)\\b(bitAnd|bitNot|bitOr|bitXor)\\b" 108 | name: "keyword.operator.bitwise.livecodescript" 109 | } 110 | { 111 | match: "(?i)(=|<>|>=|<=|<|>)|\\b(is( among| not among| not in| a| an| not| in| not within| within| not a| not an)*|there is( no| not a| not an| a| an)|contains|ends with|begins with|is among the keys of|is not among the keys of)\\b" 112 | name: "keyword.operator.comparison.livecodescript" 113 | } 114 | { 115 | match: "(&|&&)" 116 | name: "keyword.operator.string.livecodescript" 117 | } 118 | { 119 | match: "(\\^)|\\b(div|mod|wrap)\\b" 120 | name: "keyword.operator.other.livecodescript" 121 | } 122 | { 123 | match: "(\\^)|\\b(abs|acos|aliasReference|annuity|arrayDecode|arrayEncode|asin|atan(2)*|average(Deviation)*|avg(Dev)*|base64Decode|base64Encode|baseConvert|binaryDecode|binaryEncode|byte(Offset|ToNum)+|cachedURL(s)*|charToNum|cipherNames|codepoint(Offset|Property|ToNum)+|codeunitOffset|commandNames|compound|compress|constantNames|cos|date(Format)*|decompress|directories|diskSpace|DNSServers|exp(1|2|10)*|extents|files|flushEvents|folders|format|functionNames|geometricMean|global(s|Names)+|harmonicMean|hasMemory|hostAddress|hostAddressToName|hostName(ToAddress)*|isNumber|ISOToMac|itemOffset|keys|len(gth)*|libURLErrorData|libUrlFormData|libURLftpCommand|libURLLastHTTPHeaders|libURLLastRHHeaders|libUrlMultipartFormAddPart|libUrlMultipartFormData|libURLVersion|lineOffset|ln(1)*|localNames|log(2|10)*|longFilePath|lower|macToISO|matchChunk|matchText|matrixMultiply|max|md5Digest|median|merge|milli(sec|secs|second|seconds)+|min|monthNames|nativeCharToNum|normalizeText|num(ber|ToByte|ToChar|ToCodepoint|ToNativeChar)*|offset|open(files|Processes)*|openProcessIDs|openSockets|paragraphOffset|paramCount|param(s)*|peerAddress|pendingMessages|platform|popStdDev|populationStandardDeviation|popVariance|populationVariance|processID|random(Bytes)*|replaceText|result|revCreateXMLTree|revCreateXMLTreeFromFile|revCurrentRecord|revCurrentRecordIsFirst|revCurrentRecordIsLast|revDatabaseColumnCount|revDatabaseColumnIsNull|revDatabaseColumnLengths|revDatabaseColumnName(s|d)+|revDatabaseColumnNumbered|revDatabaseColumnTypes|revDatabaseConnectResult|revDatabaseCursors|revDatabaseID|revDatabaseTableNames|revDatabaseType|revDataFromQuery|revdb_closeCursor|revdb_columnbynumber|revdb_columncount|revdb_columnisnull|revdb_columnlengths|revdb_columnnames|revdb_columntypes|revdb_commit|revdb_connect(ions)*|revdb_connectionerr|revdb_currentrecord|revdb_cursorconnection|revdb_cursorerr|revdb_cursors|revdb_dbtype|revdb_disconnect|revdb_execute|revdb_is(eof|bof)+|revdb_movefirst|revdb_movelast|revdb_movenext|revdb_moveprev|revdb_query|revdb_querylist|revdb_recordcount|revdb_rollback|revdb_tablenames|revGetDatabaseDriverPath|revNumberOfRecords|revOpenDatabase(s)*|revQueryDatabase(Blob)*|revQuery(Result|IsAtStart|IsAtEnd)+|revUnixFromMacPath|revXMLAttribute(s)*|revXMLAttributeValues|revXMLChildContents|revXMLChildNames|revXMLCreateTreeFromFileWithNamespaces|revXMLCreateTreeWithNamespaces|revXMLDataFromXPathQuery|revXMLEvaluateXPath|revXMLFirstChild|revXMLMatchingNode|revXMLNextSibling|revXMLNodeContents|revXMLNumberOfChildren|revXMLParent|revXMLPreviousSibling|revXMLRootNode|revXMLRPC_CreateRequest|revXMLRPC_Documents|revXMLRPC_Error|revXMLRPC_Execute|revXMLRPC_GetHost|revXMLRPC_GetMethod|revXMLRPC_GetParam|revXMLText|revXMLRPC_GetParamCount|revXMLRPC_GetParamNode|revXMLRPC_GetParamType|revXMLRPC_GetPath|revXMLRPC_GetPort|revXMLRPC_GetProtocol|revXMLRPC_GetRequest|revXMLRPC_GetResponse|revXMLRPC_GetSocket|revXMLTree(s)*|revXMLValidateDTD|revZipDescribeItem|revZipEnumerateItems|revZipOpenArchives|round|sampVariance|sec(s|onds)*|sentenceOffset|sha1Digest|shell|shortFilePath|sin|specialFolderPath|sqrt|standardDeviation|statRound|stdDev|sum|sysError|systemVersion|tan|tempName|textDecode|textEncode|tick(s)*|time|to(Lower|Upper)*|tokenOffset|transpose|truewordOffset|trunc|uniDecode|uniEncode|upper|urlDecode|urlEncode|urlStatus|uuid|value|variableNames|variance|version|waitDepth|weekdayNames|wordOffset|xsltApplyStylesheet|xsltApplyStylesheetFromFile|xsltLoadStylesheet|xsltLoadStylesheetFromFile)\\b" 124 | name: "storage.type.fctn.livecodescript" 125 | } 126 | { 127 | match: "(\\^)|\\b(add|breakpoint|cancel|clear( local| global| variable| file| word| line| folder| directory| URL)*|close( file| socket| process)*|combine|constant|convert|(create|new)( alias| folder| directory)*|decrypt( using rsa)*|delete( directory| file| folder| global| line| local| session| URL| variable| word)*|dispatch|divide|do|encrypt( using rsa)*|filter|get|global|include|intersect|kill|libURLDownloadToFile|libURLFollowHttpRedirects|libURLftpUpload(File)*|libURLresetAll|libUrlSetAuthCallback|libURLSetCustomHTTPHeaders|libUrlSetExpect100|libURLSetFTPListCommand|libURLSetFTPMode|libURLSetFTPStopTime|libURLSetStatusCallback|load URL|local|multiply|open( socket| file| process)*|post|prepare|put( binary| content| cookie| header| markup| unicode)*|read( from process| from socket| from file)*|rename|replace|require|resetAll|resolve|revAddXMLNode|revAppendXML|revCloseCursor|revCloseDatabase|revCommitDatabase|revCopyFile|revCopyFolder|revCopyXMLNode|revDeleteFolder|revDeleteXMLNode|revDeleteAllXMLTrees|revDeleteXMLTree|revExecuteSQL|revGoURL|revInsertXMLNode|revMoveFolder|revMoveToFirstRecord|revMoveToLastRecord|revMoveToNextRecord|revMoveToPreviousRecord|revMoveToRecord|revMoveXMLNode|revPutIntoXMLNode|revRollBackDatabase|revSetDatabaseDriverPath|revSetXMLAttribute|revXMLRPC_AddParam|revXMLRPC_DeleteAllDocuments|revXMLAddDTD|revXMLRPC_Free|revXMLRPC_FreeAll|revXMLRPC_DeleteDocument|revXMLRPC_DeleteParam|revXMLRPC_SetHost|revXMLRPC_SetMethod|revXMLRPC_SetPort|revXMLRPC_SetProtocol|revXMLRPC_SetSocket|revZipAddItemWithData|revZipAddItemWithFile|revZipAddUncompressedItemWithData|revZipAddUncompressedItemWithFile|revZipCancel|revZipCloseArchive|revZipDeleteItem|revZipExtractItemToFile|revZipExtractItemToVariable|revZipSetProgressCallback|revZipRenameItem|revZipReplaceItemWithData|revZipReplaceItemWithFile|revZipOpenArchive|seek( to| rel| relative)*|send|set|sort|split|start( session)*|stop( session)*|subtract|union|unload( URL)*|wait|write)\\b" 128 | name: "storage.type.comnd.livecodescript" 129 | } 130 | { 131 | include: "#constants" 132 | } 133 | { 134 | include: "#support" 135 | } 136 | { 137 | include: "#numbers" 138 | } 139 | { 140 | include: "#strings" 141 | } 142 | { 143 | include: "#variables" 144 | } 145 | ] 146 | numbers: 147 | match: "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)\\b" 148 | name: "constant.numeric.livecodescript" 149 | "string-quoted": 150 | begin: "\"" 151 | beginCaptures: 152 | "0": 153 | name: "punctuation.definition.string.begin.livecodescript" 154 | contentName: "meta.string-contents.quoted.double.livecodescript" 155 | end: "\"" 156 | endCaptures: 157 | "0": 158 | name: "punctuation.definition.string.end.livecodescript" 159 | name: "string.quoted.double.livecodescript" 160 | patterns: [ 161 | { 162 | include: "#interpolation" 163 | } 164 | ] 165 | strings: 166 | patterns: [ 167 | { 168 | include: "#string-quoted" 169 | } 170 | ] 171 | var_global: 172 | match: "\\bg[A-Z]{1}.*?\\b" 173 | name: "variable.other.global.livecodescript" 174 | var_local: 175 | match: "\\bt[he]*[A-Z]{1}.*?\\b" 176 | name: "variable.other.local.livecodescript" 177 | var_parameter: 178 | match: "\\bp[A-Z]{1}.*?\\b" 179 | name: "variable.other.param.livecodescript" 180 | var_scriptLocal: 181 | match: "\\bs[A-Z]{1}.*?\\b" 182 | name: "variable.other.scriptlocal.livecodescript" 183 | var_server: 184 | match: "\\$_[A-Z]+" 185 | name: "variable.other.server.livecodescript" 186 | variables: 187 | patterns: [ 188 | { 189 | include: "#var_global" 190 | } 191 | { 192 | include: "#var_scriptLocal" 193 | } 194 | { 195 | include: "#var_local" 196 | } 197 | { 198 | include: "#var_parameter" 199 | } 200 | { 201 | include: "#var_server" 202 | } 203 | ] 204 | -------------------------------------------------------------------------------- /lib/main.coffee: -------------------------------------------------------------------------------- 1 | {BufferedProcess, CompositeDisposable} = require 'atom' 2 | 3 | module.exports = 4 | config: 5 | executablePath: 6 | type: 'string' 7 | title: 'LiveCode Server Engine Path' 8 | default: 'livecode-server' # Let OS's $PATH handle the rest 9 | description: 'Where is your livecode server installed? ' + 10 | 'Default assumes it\'s on $PATH' 11 | explicitVars: 12 | type: 'boolean' 13 | title: 'Explicit Variables' 14 | default: 'false' 15 | description: 'Get errors on undeclared variables' 16 | lcCompilePath: 17 | type: 'string' 18 | title: 'Compiler Path For LiveCode Builder' 19 | default: switch 20 | when process.platform == 'darwin' 21 | then '~/livecode/_build/mac/Debug/lc-compile' 22 | when process.platform == 'linux' 23 | then '~/livecode/build-linux-x86_64/livecode/out/Debug/lc-compile' 24 | when process.platform == 'win32' 25 | then '~/livecode/_build/Win32/Debug/lc-compile.exe' 26 | description: 'Where is your lc-compile installed? ' + 27 | 'Default assumes it\'s on $PATH' 28 | modulePaths: 29 | type: 'string' 30 | title: 'Module Paths For LiveCode Builder' 31 | default: switch 32 | when process.platform == 'darwin' 33 | then '~/livecode/_build/mac/Debug/modules/lci/' 34 | when process.platform == 'linux' 35 | then '~/livecode/build-linux-x86_64/livecode/out/Debug/modules/lci/' 36 | when process.platform == 'win32' 37 | then '~/livecode/_build/Win32/Debug/modules/lci/' 38 | description: 'Where are the modules installed? ' + 39 | 'Default is where they should be after building ' + 40 | 'a debug build of LiveCode. Delimit paths with `;`.' 41 | 42 | activate: -> 43 | @subscriptions = new CompositeDisposable 44 | @subscriptions.add atom.config.observe 'language-livecode.executablePath', 45 | (executablePath) => 46 | @executablePath = executablePath 47 | @subscriptions.add atom.config.observe 'language-livecode.explicitVars', 48 | (explicitVars) => 49 | @explicitVars = explicitVars 50 | @subscriptions.add atom.config.observe 'language-livecode.lcCompilePath', 51 | (lcCompilePath) => 52 | @lcCompilePath = lcCompilePath 53 | @subscriptions.add atom.config.observe 'language-livecode.modulePaths', 54 | (modulePaths) => 55 | @modulePaths = modulePaths 56 | path = require 'path' 57 | @linterPath = path.join(__dirname, '..', 'tools', 'Linter.lc') 58 | @notified = false 59 | 60 | deactivate: -> 61 | @subscriptions.dispose() 62 | 63 | provideLinter: -> 64 | provider = 65 | grammarScopes: ['source.livecodescript', 'source.iRev', 'source.lcb'] 66 | scope: 'file' 67 | lintsOnChange: true 68 | name: 'language-livecode' 69 | lint: (textEditor) => 70 | filePath = textEditor.getPath() 71 | command = @executablePath 72 | parameters = [] 73 | stackfile = @linterPath 74 | parameters.push(stackfile) 75 | scope = '-scope=' + textEditor.getRootScopeDescriptor() 76 | parameters.push(scope) 77 | explicitVariables = '-explicitVariables=' + @explicitVars 78 | parameters.push(explicitVariables) 79 | lcCompile = '-lcCompile=' + @lcCompilePath 80 | parameters.push(lcCompile) 81 | lcCompileModulePaths = '-modulePaths=' + @modulePaths 82 | parameters.push(lcCompileModulePaths) 83 | editorFilePath = '-filepath=' + filePath 84 | parameters.push(editorFilePath) 85 | text = textEditor.getText() 86 | return @exec(command, parameters, {stdin: text}).then (output) -> 87 | regex = /(\d+),(\d+),(.*)/g 88 | messages = [] 89 | while((match = regex.exec(output)) isnt null) 90 | line = match[1]-1 91 | messages.push 92 | severity: 'error' 93 | location: 94 | file: filePath 95 | position: [ 96 | [ 97 | line 98 | match[2] - 0 99 | ] 100 | [ 101 | line 102 | textEditor.getBuffer().lineLengthForRow(line) 103 | ] 104 | ] 105 | excerpt: match[3] 106 | return messages 107 | 108 | exec: (command, args = [], options = {}) -> 109 | return new Promise (resolve, reject) -> 110 | data = stdout: [], stderr: [] 111 | stdout = (output) -> data.stdout.push(output.toString()) 112 | stderr = (output) -> data.stderr.push(output.toString()) 113 | exit = -> 114 | resolve(data.stdout.join('')) 115 | handleError = (errorObject) -> 116 | errorObject.handle() 117 | if !@notified 118 | atom.notifications.addWarning( 119 | 'Please check you have LiveCode Server installed correctly', 120 | { 121 | detail: 'LiveCode Server is required for linting your files\n' + 122 | 'edit the location in the package settings' 123 | } 124 | ) 125 | @notified = true 126 | resolve('') 127 | spawnedProcess = new BufferedProcess({command, args, options, stdout, stderr, exit}) 128 | spawnedProcess.onWillThrowError(handleError) 129 | if options.stdin 130 | spawnedProcess.process.stdin.write(options.stdin.toString()) 131 | spawnedProcess.process.stdin.end() # We have to end it or the programs will keep waiting forever 132 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "language-livecode", 3 | "version": "0.7.0", 4 | "description": "Support for editing LiveCode source code", 5 | "repository": "https://github.com/livecode/atom-language-livecode", 6 | "license": "GPLv3", 7 | "engines": { 8 | "atom": "*" 9 | }, 10 | "main": "./lib/main", 11 | "providedServices": { 12 | "linter": { 13 | "versions": { 14 | "2.0.0": "provideLinter" 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /snippets/language-livecode.cson: -------------------------------------------------------------------------------- 1 | # If you want some example snippets, check out: 2 | # https://github.com/atom/language-gfm/blob/master/snippets/gfm.cson 3 | '.source.lcb': 4 | 5 | 'module … end module': 6 | 'prefix': 'module' 7 | 'body': 'module ${1:/* name */}\n\n\nend module' 8 | 'library … end library': 9 | 'prefix': 'library' 10 | 'body': 'library ${1:/* name */}\n\n\nend library' 11 | 'widget … end widget': 12 | 'prefix': 'widget' 13 | 'body': 'widget ${1:/* name */}\n\n\nend widget' 14 | 15 | 'if … end if': 16 | 'prefix': 'if' 17 | 'body': 'if ${1:/* condition */} then\n\t${2:/* code */}\nend if' 18 | 'if … else … end if': 19 | 'prefix': 'ife' 20 | 'body': 'if ${1:/* condition */} then\n\t${2:/* code */}\nelse\n\t${3:/* code */}\nend if' 21 | 22 | 'repeat': 23 | 'prefix': 'repeat' 24 | 'body': 'repeat ${1:/* iterator */}\n\t${2:/*code*/}\nend repeat' 25 | 26 | 'handler': 27 | 'prefix': 'handler' 28 | 'body': 'handler ${1:/* name */}(${2:/* args */}) returns ${3:/* type */}\n\t${4:/* code */}\nend handler' 29 | 30 | 'lcbtemplate': 31 | 'prefix': 'lcbt' 32 | 'body': '-- declaring extension as widget, followed by identifier\n 33 | widget community.livecode.username.identifier\n 34 | use com.livecode.canvas\n 35 | use com.livecode.widget\n 36 | use com.livecode.engine\n 37 | metadata title is "title"\n 38 | metadata author is "author"\n 39 | metadata version is "1.0.0"\n 40 | \n 41 | -- property yourProperty get mYourVariable set yourSetCommand 42 | \n 43 | \n 44 | public handler OnLoad(in pProperties as Array)\n 45 | -- your code here\n 46 | put pProperties["myProperty"] into mMyVariable\n 47 | end handler\n 48 | \n 49 | public handler OnSave(out rProperties as Array)\n 50 | -- your code here\n 51 | put the empty array into rProperties\n 52 | put mMyVariable into rProperties["myProperty"]\n 53 | return rProperties\n 54 | end handler\n 55 | \n 56 | public handler OnCreate()\n 57 | -- your code here\n 58 | end handler\n 59 | \n 60 | public handler OnPaint()\n 61 | -- your code here\n 62 | end handler\n 63 | \n 64 | end widget' 65 | -------------------------------------------------------------------------------- /snippets/livecode.cson: -------------------------------------------------------------------------------- 1 | ".source.livecodescript, .source.iRev": 2 | "COOKIE['...']": 3 | prefix: "$_" 4 | body: "$_COOKIE[\"${1:variable}\"]" 5 | Command: 6 | prefix: "com" 7 | body: ''' 8 | command ${1:name} ${2:params} 9 | ${3:# code...} 10 | end ${1} 11 | ${0} 12 | ''' 13 | "FILES['...']": 14 | prefix: "$_" 15 | body: "$_FILES[\"${1:variable}\"]" 16 | Function: 17 | prefix: "func" 18 | body: ''' 19 | function ${1:name} ${2:params} 20 | ${3:# code...} 21 | end ${1} 22 | ${0} 23 | ''' 24 | "GET['…']": 25 | prefix: "$_" 26 | body: "$_GET[\"${1:variable}\"]" 27 | "GET_BINARY['…']": 28 | prefix: "$_" 29 | body: "$_GET_BINARY[\"${1:variable}\"]" 30 | "GET_RAW['…']": 31 | prefix: "$_" 32 | body: "$_GET_RAW[\"${1:variable}\"]" 33 | If: 34 | prefix: "if" 35 | body: ''' 36 | if ${1:# code...} then 37 | ${2:# code...} 38 | end if 39 | ${0} 40 | ''' 41 | "POST['…']": 42 | prefix: "$_" 43 | body: "$_POST[\"${1:variable}\"]" 44 | "POST_BINARY['…']": 45 | prefix: "$_" 46 | body: "$_POST_BINARY[\"${1:variable}\"]" 47 | "POST_RAW['…']": 48 | prefix: "$_" 49 | body: "$_POST_RAW[\"${1:variable}\"]" 50 | Repeat: 51 | prefix: "repeat" 52 | body: ''' 53 | repeat ${1:loopform} 54 | ${0:# code...} 55 | end repeat 56 | ''' 57 | "SERVER['CONTENT_LENGTH']": 58 | prefix: "$_" 59 | body: "$_SERVER[\"CONTENT_LENGTH\"]" 60 | "SERVER['CONTENT_TYPE']": 61 | prefix: "$_" 62 | body: "$_SERVER[\"CONTENT_TYPE\"]" 63 | "SERVER['DOCUMENT_ROOT']": 64 | prefix: "$_" 65 | body: "$_SERVER[\"DOCUMENT_ROOT\"]" 66 | "SERVER['GATEWAY_INTERFACE']": 67 | prefix: "$_" 68 | body: "$_SERVER[\"GATEWAY_INTERFACE\"]" 69 | "SERVER['HTTPS']": 70 | prefix: "$_" 71 | body: "$_SERVER[\"HTTPS\"]" 72 | "SERVER['HTTP_ACCEPT']": 73 | prefix: "$_" 74 | body: "$_SERVER[\"HTTP_ACCEPT\"]" 75 | "SERVER['HTTP_ACCEPT_ENCODING']": 76 | prefix: "$_" 77 | body: "$_SERVER[\"HTTP_ACCEPT_ENCODING\"]" 78 | "SERVER['HTTP_ACCEPT_LANGUAGE']": 79 | prefix: "$_" 80 | body: "$_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]" 81 | "SERVER['HTTP_CONNECTION']": 82 | prefix: "$_" 83 | body: "$_SERVER[\"HTTP_CONNECTION\"]" 84 | "SERVER['HTTP_COOKIE']": 85 | prefix: "$_" 86 | body: "$_SERVER[\"HTTP_COOKIE\"]" 87 | "SERVER['HTTP_DNT']": 88 | prefix: "$_" 89 | body: "$_SERVER[\"HTTP_DNT\"]" 90 | "SERVER['HTTP_HOST']": 91 | prefix: "$_" 92 | body: "$_SERVER[\"HTTP_HOST\"]" 93 | "SERVER['HTTP_REFERRER']": 94 | prefix: "$_" 95 | body: "$_SERVER[\"HTTP_REFERRER\"]" 96 | "SERVER['HTTP_USER_AGENT']": 97 | prefix: "$_" 98 | body: "$_SERVER[\"HTTP_USER_AGENT\"]" 99 | "SERVER['PATH_INFO']": 100 | prefix: "$_" 101 | body: "$_SERVER[\"PATH_INFO\"]" 102 | "SERVER['PATH_TRANSLATED']": 103 | prefix: "$_" 104 | body: "$_SERVER[\"PATH_TRANSLATED\"]" 105 | "SERVER['QUERY_STRING']": 106 | prefix: "$_" 107 | body: "$_SERVER[\"QUERY_STRING\"]" 108 | "SERVER['REMOTE_ADDR']": 109 | prefix: "$_" 110 | body: "$_SERVER[\"REMOTE_ADDR\"]" 111 | "SERVER['REMOTE_HOST']": 112 | prefix: "$_" 113 | body: "$_SERVER[\"REMOTE_HOST\"]" 114 | "SERVER['REMOTE_PORT']": 115 | prefix: "$_" 116 | body: "$_SERVER[\"REMOTE_PORT\"]" 117 | "SERVER['REMOTE_USER']": 118 | prefix: "$_" 119 | body: "$_SERVER[\"REMOTE_USER\"]" 120 | "SERVER['REQUEST_METHOD']": 121 | prefix: "$_" 122 | body: "$_SERVER[\"REQUEST_METHOD\"]" 123 | "SERVER['REQUEST_TIME']": 124 | prefix: "$_" 125 | body: "$_SERVER[\"REQUEST_TIME\"]" 126 | "SERVER['REQUEST_URI']": 127 | prefix: "$_" 128 | body: "$_SERVER[\"REQUEST_URI\"]" 129 | "SERVER['SCRIPT_FILENAME']": 130 | prefix: "$_" 131 | body: "$_SERVER[\"SCRIPT_FILENAME\"]" 132 | "SERVER['SCRIPT_NAME']": 133 | prefix: "$_" 134 | body: "$_SERVER[\"SCRIPT_NAME\"]" 135 | "SERVER['SERVER_ADDR']": 136 | prefix: "$_" 137 | body: "$_SERVER[\"SERVER_ADDR\"]" 138 | "SERVER['SERVER_ADMIN']": 139 | prefix: "$_" 140 | body: "$_SERVER[\"SERVER_ADMIN\"]" 141 | "SERVER['SERVER_NAME']": 142 | prefix: "$_" 143 | body: "$_SERVER[\"SERVER_NAME\"]" 144 | "SERVER['SERVER_PORT']": 145 | prefix: "$_" 146 | body: "$_SERVER[\"SERVER_PORT\"]" 147 | "SERVER['SERVER_PROTOCOL']": 148 | prefix: "$_" 149 | body: "$_SERVER[\"SERVER_PROTOCOL\"]" 150 | "SERVER['SERVER_SIGNATURE']": 151 | prefix: "$_" 152 | body: "$_SERVER[\"SERVER_SIGNATURE\"]" 153 | "SERVER['SERVER_SOFTWARE']": 154 | prefix: "$_" 155 | body: "$_SERVER[\"SERVER_SOFTWARE\"]" 156 | Switch: 157 | prefix: "switch" 158 | body: ''' 159 | switch ${1:switchExpression} 160 | case ${2:caseValue} 161 | ${3:# code...} 162 | break 163 | default 164 | ${4:# code...} 165 | end switch 166 | ${0} 167 | ''' 168 | Try: 169 | prefix: "try" 170 | body: ''' 171 | try 172 | ${1:# code...} 173 | catch ${2:tError} 174 | ${3:# code...} 175 | end try 176 | ${0} 177 | ''' 178 | -------------------------------------------------------------------------------- /snippets/revigniter.cson: -------------------------------------------------------------------------------- 1 | ".source.iRev, .text.html.iRev": 2 | "Accept Charset": 3 | prefix: "useragent1" 4 | body: "rigAcceptCharset()" 5 | "Accept Language": 6 | prefix: "useragent2" 7 | body: "rigAcceptLang()" 8 | "Add Table Row Array": 9 | prefix: "table2" 10 | body: "rigAddTableRow ${1:array}" 11 | "Add Table Row": 12 | prefix: "table1" 13 | body: "rigAddTableRow \"${1:list}\"" 14 | "Add Validation Group": 15 | prefix: "formvalidation1" 16 | body: "rigAddValidationGrp ${1:\"${2:group}\"}${0}" 17 | "Add Validation Rules": 18 | prefix: "formvalidation2" 19 | body: "rigAddValidationRules \"${1:field}\", \"${2:label}\", \"${3:rules}\", \"${4:configArrayName}\"${0}" 20 | "Affected Rows": 21 | prefix: "database1" 22 | body: "rigDbAffectedRows()" 23 | "Agent Platform": 24 | prefix: "useragent3" 25 | body: "rigAgentPlatform()" 26 | "Agent String": 27 | prefix: "useragent4" 28 | body: "rigAgentString()" 29 | "Alt Message": 30 | prefix: "email1" 31 | body: "rigSet_sAltMessage \"${1:string}\"${0}" 32 | "URL Anchor": 33 | prefix: "url7" 34 | body: "rigAnchor(${1:\"${2:URI}\"${3:, \"${4:Title}\"${5:, ${6:Attributes}}}})${0}" 35 | "Array Element": 36 | prefix: "array1" 37 | body: "rigArrayElement(\"${1:indexName}\", ${2:array}${3:, ${4:FALSE}})${0}" 38 | "Array Elements": 39 | prefix: "array7" 40 | body: "rigElementsList(${1:array})${0}" 41 | "Array Implode": 42 | prefix: "array6" 43 | body: ''' 44 | rigImplode(${1:array}, "${2:glue}")${0} 45 | 46 | ''' 47 | "Array Keys": 48 | prefix: "array3" 49 | body: "rigArrayKeys(${1:array})${0}" 50 | "Array Merge": 51 | prefix: "array8" 52 | body: "rigArrayMerge(${1:arrayA}, ${2:arrayB}${3:, \"${4:firstDelim}\", \"${5:secondDelim}\"})${0}" 53 | "Array Splice": 54 | prefix: "array5" 55 | body: "rigArraySplice(${1:array}, ${2:offset}, ${3:length})${0}" 56 | "Array Values": 57 | prefix: "array4" 58 | body: "rigArrayValues(${1:array})${0}" 59 | "Asset Add Favicon": 60 | prefix: "asset1" 61 | body: "rigAddFavicon(${1:\"${2:moduleName}\"${3:, ${4:cacheBuster}}})${0}" 62 | "Asset CSS Dynamic": 63 | prefix: "asset3" 64 | body: "rigDynamicCssAsset(\"${1:cssName}\"${2:, ${3:attribs}${4:, \"${5:moduleName}\"${6:, ${7:cacheBuster}}}})${0}" 65 | "Asset CSS": 66 | prefix: "asset2" 67 | body: "rigCssAsset(\"${1:cssName}\"${2:, ${3:attribs}${4:, \"${5:moduleName}\"${6:, ${7:cacheBuster}}}})${0}" 68 | "Asset Image Data": 69 | prefix: "asset5" 70 | body: ''' 71 | put "${1:picSelector}" into t${2:Array}["${3:class/id}"] 72 | put "${4:altText}" into t${2}["alt"] 73 | put "${5:0}" into t${2}["width"] 74 | put "${6:0}" into t${2}["height"] 75 | put rigImageAsset("${7:fileName}", t${2}${8:, "${9:module}"${10:, ${11:cacheBuster}}}) into ${12:var}${0} 76 | 77 | ''' 78 | "Asset Image URL": 79 | prefix: "asset6" 80 | body: "rigImgAssetURL(\"${1:imageName}\"${2:, \"${3:moduleName}\"${4:, ${5:cacheBuster}}})${0}" 81 | "Asset Image": 82 | prefix: "asset4" 83 | body: "rigImageAsset(\"${1:imageName}\"${2:, ${3:attribs}${4:, \"${5:moduleName}\"${6:, ${7:cacheBuster}}}})${0}" 84 | "Asset JS": 85 | prefix: "asset7" 86 | body: "rigJsAsset(\"${1:jsName}\"${2:, \"${3:moduleName}\"${4:, ${5:cacheBuster}${6:, \"${7:async defer}\"}}})${0}" 87 | "Asset Write Manifest": 88 | prefix: "asset8" 89 | body: "rigWriteManifest \"${1:resourcespath}\", \"${2:name}\"${3:, ${4:absoluteuri}, ${5:network}, ${6:fallback}, \"${7:ignore}\"}${0}" 90 | "Assoc to URI": 91 | prefix: "uri0" 92 | body: "rigAssocToURI(${1:array})${0}" 93 | Attach: 94 | prefix: "email2" 95 | body: "rigMailAttach \"${1:filePath}\"${0}" 96 | "Auth Activate": 97 | prefix: "auth1" 98 | body: "rigAuthActivate(${1:id}${2:, ${3:code}})${0}" 99 | "Auth Change Password": 100 | prefix: "auth2" 101 | body: "rigAuthChangePassword(${1:identity}, ${2:oldPassword}, ${3:newPassword})${0}" 102 | "Auth Clear Forgotten Password Code": 103 | prefix: "auth3" 104 | body: "rigAuthClearForgottenPasswordCode(${1:code})${0}" 105 | "Auth Clear Login Attempts": 106 | prefix: "auth4" 107 | body: "rigAuthClearLoginAttempts(${1:identity}${2:, ${3:expirePeriod}})${0}" 108 | "Auth Deactivate": 109 | prefix: "auth5" 110 | body: "rigAuthDeactivate(${1:id})${0}" 111 | "Auth Delete User": 112 | prefix: "auth6" 113 | body: "rigAuthDeleteUser(${1:id})${0}" 114 | "Auth Email Check": 115 | prefix: "auth7" 116 | body: "rigAuthEmailCheck(${1:email})${0}" 117 | "Auth Errors": 118 | prefix: "auth8" 119 | body: "rigAuthErrors(${1:${2:prefix}${3:, ${4:suffix}}})${0}" 120 | "Auth Fetch Config Item": 121 | prefix: "auth9" 122 | body: "rigAuthFetchConfigItem(${1:item}${2:, ${3:index}})${0}" 123 | "Auth Forgotten Password Check": 124 | prefix: "auth11" 125 | body: "rigAuthForgottenPasswordCheck(${1:code})${0}" 126 | "Auth Forgotten Password": 127 | prefix: "auth10" 128 | body: "rigAuthForgottenPassword(${1:identity})${0}" 129 | "Auth Get Attempts Num": 130 | prefix: "auth12" 131 | body: "rigAuthGetAttemptsNum(${1:identity})${0}" 132 | "Auth Group": 133 | prefix: "auth13" 134 | body: "rigAuthGroup(${1:groupID})${0}" 135 | "Auth Groups": 136 | prefix: "auth17" 137 | body: "rigAuthGroups()" 138 | "Auth Identity Check": 139 | prefix: "auth14" 140 | body: "rigAuthIdentityCheck(${1:identity})${0}" 141 | "Auth In Group": 142 | prefix: "auth16" 143 | body: "rigAuthInGroup(${1:group}${2:, ${3:userID}})${0}" 144 | "Auth Increase Login Attempts": 145 | prefix: "auth15" 146 | body: "rigAuthIncreaseLoginAttempts(${1:identity})${0}" 147 | "Auth Is Admin": 148 | prefix: "auth18" 149 | body: "rigAuthIsAdmin(${1:id})${0}" 150 | "Auth Is Max Login Exceeded": 151 | prefix: "auth19" 152 | body: "rigAuthIsMaxLoginAttemptsExceeded(${1:identity})${0}" 153 | "Auth Logged In": 154 | prefix: "auth20" 155 | body: "rigAuthLoggedIn()" 156 | "Auth Login": 157 | prefix: "auth21" 158 | body: "rigAuthLogin(${1:identity}, ${2:password}${3:, ${4:FALSE}})${0}" 159 | "Auth Logout": 160 | prefix: "auth22" 161 | body: "rigAuthLogout" 162 | "Auth Messages": 163 | prefix: "auth23" 164 | body: "rigAuthMessages(${1:${2:prefix}${3:, ${4:suffix}}})${0}" 165 | "Auth Register": 166 | prefix: "auth24" 167 | body: "rigAuthRegister(${1:username}, ${2:password}, ${3:email}${4:, ${5:extraData}${6:, ${7:groupName}}})${0}" 168 | "Auth Remove From Group": 169 | prefix: "auth25" 170 | body: "rigAuthRemoveFromGroup(${1:groupIDs}, ${2:userID})${0}" 171 | "Auth Reset Password": 172 | prefix: "auth26" 173 | body: "rigAuthResetPassword(${1:identity}, ${2:newPassword})${0}" 174 | "Auth Set Error Delimiters": 175 | prefix: "auth27" 176 | body: "rigAuthSetErrorDelimiters ${1:startDelimiter}, ${2:endDelimiter}${0}" 177 | "Auth Set Message Delimiters": 178 | prefix: "auth28" 179 | body: "rigAuthSetMessageDelimiters ${1:startDelimiter}, ${2:endDelimiter}${0}" 180 | "Auth Update": 181 | prefix: "auth29" 182 | body: "rigAuthUpdate(${1:id}, ${2:data})${0}" 183 | "Auth User Groups": 184 | prefix: "auth31" 185 | body: "rigAuthUserGroups(${1:id})${0}" 186 | "Auth User": 187 | prefix: "auth30" 188 | body: "rigAuthUser(${1:id})${0}" 189 | "Auth Username Check": 190 | prefix: "auth33" 191 | body: "rigAuthUsernameCheck(${1:username})${0}" 192 | "Auth Users": 193 | prefix: "auth32" 194 | body: "rigAuthUsers(${1:groupIDs})${0}" 195 | "Auth Clear OTP": 196 | prefix: "auth34" 197 | body: "rigAuthClearOTP(${1:userID})${0}" 198 | "Auth Generate QR Code": 199 | prefix: "auth35" 200 | body: "rigAuthGenerateQR(${1:\"${2:account}\"})${0}" 201 | "Auth OTP Keys Match": 202 | prefix: "auth36" 203 | body: "rigAuthOTPkeysMatch(${1:challenge})${0}" 204 | "Auth User Has OTP": 205 | prefix: "auth37" 206 | body: "rigAuthUserHasOTP(${1:userID})${0}" 207 | "Authentication Library": 208 | prefix: "auth0" 209 | body: "rigLoaderLoadLibrary \"Authentication\"" 210 | "BCC Array": 211 | prefix: "email3" 212 | body: "rigMailBcc ${1:addressesArray}${0}" 213 | BCC: 214 | prefix: "email4" 215 | body: "rigMailBcc \"${1:address(list)}\"${0}" 216 | "CC Array": 217 | prefix: "email6" 218 | body: "rigMailCC ${1:addressesArray}${0}" 219 | CC: 220 | prefix: "email5" 221 | body: "rigMailCC \"${1:address(list)}\"${0}" 222 | "Mail From": 223 | prefix: "email9" 224 | body: "rigMailFrom \"${1:address}\", \"${2:name}\"${0}" 225 | "Output Cache": 226 | prefix: "output0" 227 | body: "rigOutputCache ${1:minutesToCache} ${0}" 228 | "Calendar Library": 229 | prefix: "calendar0" 230 | body: "rigLoaderLoadLibrary \"Calendar\"${1:, ${2:prefs}}${0}" 231 | "Captcha Hash": 232 | prefix: "captcha5" 233 | body: "rigGetCaptchaHash()" 234 | "Captcha Init": 235 | prefix: "captcha1" 236 | body: "rigInitCaptcha ${1:configArray}${0}" 237 | "Captcha Library": 238 | prefix: "captcha0" 239 | body: "rigLoaderLoadLibrary \"Captcha\"" 240 | "Captcha Math": 241 | prefix: "captcha3" 242 | body: "rigCaptchaMathProblem(${1:numberOfOperators})${0}" 243 | "Captcha Number": 244 | prefix: "captcha6" 245 | body: "rigGetCaptchaNum()" 246 | "Captcha Style": 247 | prefix: "captcha4" 248 | body: "rigCaptchaStyle()" 249 | "Captcha Validate": 250 | prefix: "captcha7" 251 | body: "rigValidCaptchaUserInput(${1:captchaInput}, ${2:hiddenFieldValue})${0}" 252 | Captcha: 253 | prefix: "captch2" 254 | body: "rigCaptcha()" 255 | "Clear Table Vars": 256 | prefix: "table3" 257 | body: "rigClearTableVars" 258 | Clear: 259 | prefix: "image1" 260 | body: "rigImgClear" 261 | "Clear Mail": 262 | prefix: "email7" 263 | body: "rigClearMail${1: ${2:clearAttachement}}${0}" 264 | "Get Config Item": 265 | prefix: "config1" 266 | body: "rigFetchConfigItem(\"${1:item}\"${2:, \"${3:index}\"})${0}" 267 | "Config Load File": 268 | prefix: "config0" 269 | body: "rigLoadConfigFile(\"${1:configFile}\"${2:, ${3:noCollisions}${4:, ${5:suppressErrors}}})${0}" 270 | "Cookie Delete Params": 271 | prefix: "cookie4" 272 | body: "rigDeleteCookie \"${1:name}\" ${3:, \"${6:domain}\"${7:, \"${8:path}\"${9:, \"${10:prefix}\"}}}${0}" 273 | "Cookie Delete": 274 | prefix: "cookie5" 275 | body: "rigDeleteCookie ${1:attribs}${0}" 276 | "Cookie Get": 277 | prefix: "cookie3" 278 | body: "rigGetCookie(\"${1:name}\"${2:, ${3:filter}})${0}" 279 | "Cookie Set Array": 280 | prefix: "cookie1" 281 | body: "rigSetCookie ${1:attribs}${0}" 282 | "Cookie Set Params": 283 | prefix: "cookie2" 284 | body: "rigSetCookie \"${1:name}\", \"${2:value}\"${3:, ${4:expire}${5:, \"${6:domain}\"${7:, \"${8:path}\"${9:, \"${10:prefix}\"${11:, ${12:replace}${13:, ${14:httponly}}}}}}}${0}" 285 | Cookie: 286 | prefix: "input0" 287 | body: "rigVarCookie(\"${1:item}\"${2:, ${3:xssFilter}})${0}" 288 | "Count All Results": 289 | prefix: "database3" 290 | body: "rigDbCountAllResults(\"${1:table}\")${0}" 291 | "Count All": 292 | prefix: "database2" 293 | body: "rigDbCountAll(\"${1:table}\")${0}" 294 | "Create New Command": 295 | prefix: "ricom" 296 | body: ''' 297 | /*---------------------------------------------------------------------- 298 | --| COMMAND ${1:handlerName} 299 | --| 300 | --| Author: ${2:yourName} 301 | --| Version: 1.0 302 | --| Created: ${3:theDate} 303 | --| Last Mod: ${3} 304 | --| Requires: ${4:--} 305 | --| 306 | --| Summary: ${5:description} 307 | --| 308 | --| Format: ${1} ${6:params} 309 | --| 310 | --| Parameters: ${7:--} 311 | --| 312 | --| Return: ${8:empty} 313 | ----------------------------------------------------------------------*/ 314 | 315 | command ${1} ${9:params} 316 | ${10:# code...} 317 | end ${1} 318 | ${0} 319 | ''' 320 | "Create New Controller": 321 | prefix: "ricont" 322 | body: ''' 323 | the short name of me then 391 | pass libraryStack 392 | end if 393 | end libraryStack 394 | 395 | 396 | ${0} 397 | 398 | 399 | 400 | --| END OF ${1:modelName}.livecodescript 401 | --| Location: ./application/models/${1:modelName}.livecodescript 402 | ---------------------------------------------------------------------- 403 | ''' 404 | "Create New Config": 405 | prefix: "riconfig" 406 | body: ''' 407 | TRUE then 456 | put TRUE into sStackInUse 457 | end if 458 | 459 | else 460 | pass libraryStack 461 | end if -- if the short name of the target = the short name of me 462 | end libraryStack 463 | 464 | 465 | ${0} 466 | 467 | 468 | 469 | --| END OF ${1:hookName}.livecodescript 470 | --| Location: ./application/hooks/${1:hookName}.livecodescript 471 | ---------------------------------------------------------------------- 472 | ''' 473 | "Create Pagination Links": 474 | prefix: "pagination1" 475 | body: "rigCreatePaginationLinks()" 476 | "DB Cache Delete All": 477 | prefix: "database5" 478 | body: "rigDbCacheDeleteAll${1: \"${2:fileToExclude}\"}${0}" 479 | "DB Cache Delete": 480 | prefix: "database4" 481 | body: "rigDbCacheDelete \"${1:controller}\", \"${2:method}\"${0}" 482 | "DB Cache Off": 483 | prefix: "database6" 484 | body: "rigDbCacheOff()" 485 | "DB Cache On": 486 | prefix: "database7" 487 | body: "rigDbCacheOn()" 488 | "DB Close Parenthesis": 489 | prefix: "database8" 490 | body: "rigDbCloseParenthesis" 491 | "DB Escape Like Str": 492 | prefix: "database11" 493 | body: "rigEscapeLikeStr(${1:string})${0}" 494 | "DB Escape Str": 495 | prefix: "database10" 496 | body: "rigEscapeStr(${1:data})${0}" 497 | "DB Escape": 498 | prefix: "database9" 499 | body: "rigDbEscape(${1:string})${0}" 500 | "DB Open Parenthesis": 501 | prefix: "database12" 502 | body: "rigDbOpenParenthesis" 503 | "DB Prefix": 504 | prefix: "database13" 505 | body: "rigDbPrefix(\"${1:table}\")${0}" 506 | "Data Array Value Merge": 507 | prefix: "gdmerge" 508 | body: "[[gData[\"${1:key}\"] ]]" 509 | "Data Array Value": 510 | prefix: "gd" 511 | body: "gData[\"${1:key}\"]" 512 | "Database Library": 513 | prefix: "database0" 514 | body: "get rigLoadDatabase(${1: \"${2:groupName}\"${3:, ${4:returnID}${5:, ${6:enableActiveRec}}}})${0}" 515 | "Date Days in Month": 516 | prefix: "date1" 517 | body: "rigDaysInMonth(${1:month}, ${2:year})${0}" 518 | "Date GMT to Local": 519 | prefix: "date2" 520 | body: "rigGmtToLocal(${1:time}${2:, ${3:timeZone}}${4:, ${5:DST}})${0}" 521 | "Date Human to Timestamp": 522 | prefix: "date3" 523 | body: "rigHumanToTimestamp(${1:datestring})${0}" 524 | "Date Local to GMT": 525 | prefix: "date4" 526 | body: "rigLocalToGMT(${1:time})${0}" 527 | "Date Mdate": 528 | prefix: "date5" 529 | body: "rigMdate(${1:datestring}${2:, ${3:time}})${0}" 530 | "Date MySQL to Seconds": 531 | prefix: "date6" 532 | body: "rigMysqlTimeToSeconds(${1:mysqlTime})${0}" 533 | "Date Now": 534 | prefix: "date7" 535 | body: "rigNow()" 536 | "Date Standard Date": 537 | prefix: "date8" 538 | body: "rigStandardDate(${1:format}, ${2:time})${0}" 539 | "Date Timespan": 540 | prefix: "date9" 541 | body: "rigTimespan(${1:seconds}, ${2:time})${0}" 542 | "Date Timestamp to Human": 543 | prefix: "date10" 544 | body: "rigTimestampToHuman(${1:time}${2:, ${3:showSecs}}${4:, ${5:format}})${0}" 545 | "Date Timezone Menu": 546 | prefix: "date12" 547 | body: "rigTimezoneMenu(${1:default}${2:, ${3:class}}${4:, ${5:name}})${0}" 548 | "Date Timezones": 549 | prefix: "date11" 550 | body: "rigTimezones(${1:timeZone})${0}" 551 | Debugger: 552 | prefix: "email8" 553 | body: "rigPrintMailDebugger()" 554 | Decode: 555 | prefix: "encrypt2" 556 | body: "rigDecode(${1:encryptedString})${0}" 557 | "Delete Array": 558 | prefix: "database14" 559 | body: "rigDbDelete(${1:tablesArray})${0}" 560 | "File Delete": 561 | prefix: "file4" 562 | body: "rigDeleteFiles(\"${1:path}\"${2:, ${3:bool}${4:, \"${5:exclude}\"}})${0}" 563 | Delete: 564 | prefix: "database15" 565 | body: "rigDbDelete(\"${1:table}\"${2:, ${3:where}})${0}" 566 | "Display Image Errors": 567 | prefix: "image3" 568 | body: "rigDisplayImgErrors(${1:\"${2:openingTag}\", \"${3:closingTag}\"})${0}" 569 | Distinct: 570 | prefix: "database16" 571 | body: "rigDbDistinct" 572 | "Do Exception": 573 | prefix: "except" 574 | body: "rigDoException ${1:contexts}, \"${2:currentFile}\", \"${3:currentMethod}\"${0}" 575 | "Download Force": 576 | prefix: "download1" 577 | body: "rigForceDownload \"${1:fileName}\", ${2:data}${0}" 578 | "Elapsed Time Total Cached": 579 | prefix: "benchmark3" 580 | body: "{{g_ElapsedTime_}}" 581 | "Elapsed Time Total": 582 | prefix: "benchmark2" 583 | body: "rigElapsedTime()${0:}" 584 | "Elapsed Time": 585 | prefix: "benchmark1" 586 | body: "rigElapsedTime(\"${1:start}\", \"${2:end}\")${0:}" 587 | "Email Initialize": 588 | prefix: "email10" 589 | body: "rigInitializeMail ${1:configArray}${0}" 590 | "Email Library": 591 | prefix: "email0" 592 | body: "rigLoaderLoadLibrary \"Email\"" 593 | "Email Send": 594 | prefix: "email19" 595 | body: "rigSendEmail(\"${1:recipient}\", \"${2:subject}\", \"${3:message}\", \"${4:sender}\"${7:, \"${8:cc}\"${9:, \"${10:bcc}\"}})${0}" 596 | "Email Valid": 597 | prefix: "email18" 598 | body: ''' 599 | rigValidEmail("${1:address}")${0} 600 | 601 | ''' 602 | "Empty Table": 603 | prefix: "database17" 604 | body: "rigDbEmptyTable(\"${1:table}\")${0}" 605 | "Enable Profiler": 606 | prefix: "output1" 607 | body: "rigEnableProfiler ${1:bool}${0}" 608 | Encode: 609 | prefix: "encrypt1" 610 | body: "rigEncode(${1:message}${2:, ${3:key}})${0}" 611 | "Encrypt Library": 612 | prefix: "encrypt0" 613 | body: "rigLoaderLoadLibrary \"Encrypt\"" 614 | "Fetch Segment Routed": 615 | prefix: "uri1" 616 | body: "rigFetchRsegment(${1:segmentNumber}${2:, ${3:defaultValue}})${0}" 617 | "Fetch Segment": 618 | prefix: "uri2" 619 | body: "rigFetchSegment(${1:segmentNumber}${2:, ${3:defaultValue}})${0}" 620 | "Field Data": 621 | prefix: "database18" 622 | body: "rigDbFieldData(\"${1:table}\")${0}" 623 | "Field Exists": 624 | prefix: "database19" 625 | body: "rigDbFieldExists(\"${1:field}\", \"${2:table}\")${0}" 626 | "File Upload Data": 627 | prefix: "upload2" 628 | body: ''' 629 | rigUploadData() 630 | 631 | ''' 632 | "File Upload Display Error": 633 | prefix: "upload3" 634 | body: ''' 635 | rigDisplayUploadErrors(${1:"<${2:p}>", ""})${0} 636 | 637 | ''' 638 | "File Upload Do": 639 | prefix: "upload4" 640 | body: "rigDoUpload \"${1:fieldname}\"${0}" 641 | "FTP Library": 642 | prefix: "ftp0" 643 | body: "rigLoaderLoadLibrary \"Ftp\"" 644 | "FTP Change Directory": 645 | prefix: "ftp1" 646 | body: "rigFtpChangeDir ${1:path}${0}" 647 | "FTP Close": 648 | prefix: "ftp2" 649 | body: "rigFtpClose ${0}" 650 | "FTP Create Folder": 651 | prefix: "ftp3" 652 | body: "rigFtpCreateFolder ${1:path}${2:, ${3:0700}}${0}" 653 | "FTP Delete File": 654 | prefix: "ftp4" 655 | body: "rigFtpDeleteFile ${1:path}${0}" 656 | "FTP Delete Folder": 657 | prefix: "ftp5" 658 | body: "rigFtpDeleteFolder ${1:path}${2:, ${3|recursive,FAlSE,TRUE|}${4:, ${5|purgeOnly,FALSE,TRUE|}}}${0}" 659 | "FTP Download": 660 | prefix: "ftp6" 661 | body: "rigFtpDownload ${1:remotePath}, ${2:localPath}" 662 | "FTP Initialize": 663 | prefix: "ftp7" 664 | body: "rigInitializeFTP ${1:ftpConfA}${0}" 665 | "FTP List Files": 666 | prefix: "ftp8" 667 | body: "rigFtpListFiles ${1:path}${2:, ${3|simpleList,FALSE,TRUE|}}${0}" 668 | "FTP Mirror": 669 | prefix: "ftp9" 670 | body: "rigFtpMirror ${1:localPath}, ${2:remotePath}${0}" 671 | "FTP Print Debugger": 672 | prefix: "ftp10" 673 | body: "rigFtpPrintDebugger(${1|\"status\",\"debug\"|})${0}" 674 | "FTP Rename Move": 675 | prefix: "ftp11" 676 | body: "rigFtpRenameMove ${1:oldFile}, ${2:newFile}${3:, ${4|missingDirs,FALSE,TRUE|}}${0}" 677 | "FTP Run Initial Config": 678 | prefix: "ftp12" 679 | body: "rigRunInitialFtpConfig ${1:ftpConfA}${0}" 680 | "FTP Set Permissions": 681 | prefix: "ftp13" 682 | body: "rigFtpSetPermissions ${1:path}, ${2:0700}${0}" 683 | "FTP Upload": 684 | prefix: "ftp14" 685 | body: "rigFtpUpload ${1:localPath}, ${2:remotePath}${3:, ${4|data,FALSE,TRUE|}${5:, ${6|createMissingDirs,TRUE,FALSE|}}${7:, ${8:0700}}}${0}" 686 | "File Uploading Library": 687 | prefix: "upload0" 688 | body: "rigLoaderLoadLibrary \"Upload\"" 689 | "Flash Data": 690 | prefix: "session2" 691 | body: "rigSessFlashdata(${1:\"${2:item}\"})${0}" 692 | "Flush Cache": 693 | prefix: "database20" 694 | body: "rigDbFlushCache" 695 | "Form Button Array": 696 | prefix: "form19" 697 | body: "rigFormButton(${1:attributes})${0}" 698 | "Form Button": 699 | prefix: "form20" 700 | body: "rigFormButton(\"${1:name}\", \"${2:content}\"${3:, ${4:additionalData}})${0}" 701 | "Form Checkbox Array": 702 | prefix: "form13" 703 | body: "rigFormCheckbox(${1:attributes})${0}" 704 | "Form Checkbox": 705 | prefix: "form14" 706 | body: "rigFormCheckbox(\"${1:name}\", ${2:value}, ${3:bool}${4:, ${5:additionalData}})${0}" 707 | "Form Close": 708 | prefix: "form21" 709 | body: "rigFormClose(${1:data})${0}" 710 | "Form Drop Down": 711 | prefix: "form9" 712 | body: "rigFormDropDown(\"${1:name}\", ${2:options}, ${3:selectedValues}${4:, ${5:additionalData}})${0}" 713 | "Form Error": 714 | prefix: "formvalidation3" 715 | body: "rigFormError(\"${1:fieldname}\"${2:, \"${3:delimStart}\", \"${4:delimEnd}\"})${0}" 716 | "Form Field Set Close": 717 | prefix: "form12" 718 | body: "rigFormFieldsetClose(${1:\"${2:dataBelow}\"})${0}" 719 | "Form Field Set": 720 | prefix: "form11" 721 | body: "rigFormFieldset(\"${1:legend}\"${2:, ${3:attributes}})${0}" 722 | "Form Hidden Array": 723 | prefix: "form3" 724 | body: "rigFormHidden(${1:dataArray})${0}" 725 | "Form Hidden": 726 | prefix: "form4" 727 | body: "rigFormHidden(\"${1:name}\", \"${2:value}\")${0}" 728 | "Form Input": 729 | prefix: "form5" 730 | body: "rigFormInput(${1:nameValueArray}${2:, ${3:additionalData}})${0}" 731 | "Form Label": 732 | prefix: "form17" 733 | body: "rigFormLabel(\"${1:label}\", \"${2:for}\"${3:, ${4:attributes}})${0}" 734 | "Form Mail Replace": 735 | prefix: "formmail2" 736 | body: "rigFormMailReplace()" 737 | "Form Mail": 738 | prefix: "formmail1" 739 | body: "rigFormMail(\"${1:filePath}\", ${2:substitutionArray}${3:, \"${4:prefix}\"${5:, \"${6:suffix}\"}})${0}" 740 | "Form Multiselect": 741 | prefix: "form10" 742 | body: "rigFormMultiselect(\"${1:name}[]\", ${2:options}, ${3:selectedValues}${4:, ${5:additionalData}})${0}" 743 | "Form Open Multipart": 744 | prefix: "form2" 745 | body: "rigFormOpenMultiPart(\"${1:URI}\"${2:, ${3:attributes}${4:, ${5:hidden}}})${0}" 746 | "Form Open": 747 | prefix: "form1" 748 | body: "rigFormOpen(\"${1:URI}\"${2:, ${3:attributes}${4:, ${5:hidden}}})${0}" 749 | "Form Password": 750 | prefix: "form6" 751 | body: "rigFormPassword(${1:nameValueArray}${2:, ${3:additionalData}})${0}" 752 | "Form Prep": 753 | prefix: "form22" 754 | body: "rigFormPrep(${1:data})${0}" 755 | "Form Radio": 756 | prefix: "form15" 757 | body: "rigFormRadio(\"${1:name}\", ${2:value}, ${3:bool}${4:, ${5:additionalData}})${0}" 758 | "Form Reset": 759 | prefix: "form18" 760 | body: "rigResetButton(\"${1:name}\", \"${2:value}\")${0}" 761 | "Form Set Checkbox": 762 | prefix: "form25" 763 | body: "rigSetCheckbox(\"${1:name}[]\", \"${2:value}\"${3:, ${4:bool}})${0}" 764 | "Form Set Radio": 765 | prefix: "form26" 766 | body: "rigSetRadio(\"${1:name}\", \"${2:value}\"${3:, ${4:bool}})${0}" 767 | "Form Set Select": 768 | prefix: "form24" 769 | body: "rigSetSelect(\"${1:name}\", \"${2:value}\"${3:, ${4:bool}})${0}" 770 | "Form Set Value": 771 | prefix: "form23" 772 | body: "rigSetValue(\"${1:name}\"${2:, \"${3:value}\"${4:, ${5:htmlEscape}}})${0}" 773 | "Form Submit": 774 | prefix: "form16" 775 | body: "rigSubmitButton(\"${1:name}\", \"${2:value}\")${0}" 776 | "Form Text Area": 777 | prefix: "form8" 778 | body: "rigFormTextarea(${1:nameValueArray}${2:, ${3:additionalData}})${0}" 779 | "Form Upload": 780 | prefix: "form7" 781 | body: "rigFormUpload(${1:nameValueArray}${2:, ${3:additionalData}})${0}" 782 | "Form Validation Library": 783 | prefix: "formvalidation0" 784 | body: "rigLoaderLoadLibrary \"Formvalidation\"" 785 | From: 786 | prefix: "database21" 787 | body: "rigDbFrom \"${1:table}\"${0}" 788 | GET: 789 | prefix: "input1" 790 | body: "rigVarGet(\"${1:item}\"${2:, ${3:xssFilter}})${0}" 791 | "GET POST": 792 | prefix: "input2" 793 | body: "rigVarGetPost(\"${1:item}\"${2:, ${3:xssFilter}})${0}" 794 | "Galleria Data Dynamic": 795 | prefix: "galleria2" 796 | body: "rigDynamicGalleriaData(${1:metadata}${2:, ${3:options}${4:, \"${5:id}\"${6:, \"${7:varname}\"${8:, ${9:cachebuster}}}}})${0}" 797 | "Galleria Data": 798 | prefix: "galleria1" 799 | body: "rigGalleriaData(\"${1:path}\"${2:, ${3:options}${4:, \"${5:id}\"${6:, \"${7:varname}\"${8:, ${9:cachebuster}${10:, ${11:replacefile}${12:, ${13:returnreference}}}}}}})${0}" 800 | "Generate Table": 801 | prefix: "table4" 802 | body: "rigGenerateTable(${1:dataArray})${0}" 803 | Generate: 804 | prefix: "calendar1" 805 | body: "rigCalGenerate(${1: ${2:jear}, ${3:month}${4:, ${5:data}}})${0}" 806 | "File Directory Info ": 807 | prefix: "file6" 808 | body: "rigGetDirFileInfo(\"${1:path}\"${2:, ${3:bool}${4:, ${5:bool}}})${0}" 809 | "File Info": 810 | prefix: "file7" 811 | body: "rigGetFileInfo(\"${1:path}\"${2:, \"${3:what}\"})${0}" 812 | "File Names": 813 | prefix: "file5" 814 | body: "rigGetFileNames(\"${1:path}\"${2:, ${3:bool}${4:, ${5:bool}}})${0}" 815 | "File Mime": 816 | prefix: "file8" 817 | body: "rigGetMimeByExtension(\"${1:file}\")${0}" 818 | "Get Output": 819 | prefix: "output2" 820 | body: "rigGetOutput()" 821 | "Get Where": 822 | prefix: "database23" 823 | body: "rigDbGetWhere(\"${1:table}\", ${2:whereArray}${3:, ${4:limit}, ${5:offset}})${0}" 824 | Get: 825 | prefix: "database22" 826 | body: "rigDbGet(\"${1:table}\"${2:, ${3:limit}, ${4:offset}${5:, ${6:subquery}}})${0}" 827 | "Group By Array": 828 | prefix: "database24" 829 | body: "rigDbGroupBy ${1:array}${0}" 830 | "Group By": 831 | prefix: "database25" 832 | body: "rigDbGroupBy \"${1:field}\"${0}" 833 | "HTML Doc Type": 834 | prefix: "html12" 835 | body: "rigHtmlDocType(${1: \"${2:type}\"})${0}" 836 | "HTML Heading": 837 | prefix: "html2" 838 | body: "rigHtmlHeading(\"${1:data}\", ${2:number})${0}" 839 | "HTML Img": 840 | prefix: "html3" 841 | body: "rigHtmlImg(\"${1:image}\"${2:, ${3:addIndex}})${0}" 842 | "HTML Img Array": 843 | prefix: "html4" 844 | body: "rigHtmlImg(${1:attributesArray}${2:, ${3:bool}})${0}" 845 | "HTML Line Breaks": 846 | prefix: "html1" 847 | body: "rigHtmlBr(${1:number})${0}" 848 | "HTML Link Tag Array": 849 | prefix: "html6" 850 | body: "rigHtmlLinkTag(${1:attributesArray})${0}" 851 | "HTML Link Tag": 852 | prefix: "html5" 853 | body: "rigHtmlLinkTag(\"${1:href}\", \"${2:rel}\", \"${3:type}\"${4:, \"${5:title}\", \"${6:media}\", ${7:bool}})${0}" 854 | "HTML Meta Array": 855 | prefix: "html11" 856 | body: "rigHtmlMeta(${1:numberedArray})${0}" 857 | "HTML Meta": 858 | prefix: "html10" 859 | body: "rigHtmlMeta(\"${1:name}\", \"${2:content}\"${3:, \"${4:type}\"})${0}" 860 | "HTML Nbs": 861 | prefix: "html7" 862 | body: "rigHtmlNbs(${1:number})${0}" 863 | "HTML Ordered List": 864 | prefix: "html8" 865 | body: "rigHtmlOL(${1:list}${2:, ${3:attributesArray}})${0}" 866 | "HTML Table Library": 867 | prefix: "table0" 868 | body: "rigLoaderLoadLibrary \"Table\"" 869 | "HTML Unordered List": 870 | prefix: "html9" 871 | body: "rigHtmlUL(${1:list}${2:, ${3:attributesArray}})${0}" 872 | "Having Array": 873 | prefix: "database27" 874 | body: "rigDbHaving ${1:array}${0}" 875 | Having: 876 | prefix: "database26" 877 | body: "rigDbHaving \"${1:field}\", \"${2:value}\"${3:, ${4:escaping}}${0}" 878 | "IP Address": 879 | prefix: "input3" 880 | body: "rigIpAddress()" 881 | Crop: 882 | prefix: "image2" 883 | body: "rigImageCrop()" 884 | "Image Manipulation Library": 885 | prefix: "image0" 886 | body: "rigLoaderLoadLibrary \"Image\"${1:, ${2:configArray}}${0}" 887 | Resize: 888 | prefix: "image6" 889 | body: "rigImageResize()" 890 | Rotate: 891 | prefix: "image7" 892 | body: "rigImageRotate()" 893 | "IM Version": 894 | prefix: "image8" 895 | body: "rigIMversion()" 896 | "Pagination Initialize": 897 | prefix: "pagination2" 898 | body: "rigInitializePagination ${1:configArray}${0}" 899 | "File Upload Initialize": 900 | prefix: "upload1" 901 | body: "rigInitializeUpload ${1:configArray}${0}" 902 | Insert: 903 | prefix: "database28" 904 | body: "rigDbInsert(\"${1:table}\"${2:${3:, ${4:array}}${5:, ${6:lastInsertID}}})${0}" 905 | Insertstring: 906 | prefix: "database29" 907 | body: "rigDbInsertString(\"${1:table}\", ${2:array})${0}" 908 | "Is Browser": 909 | prefix: "useragent5" 910 | body: "rigIsBrowser()" 911 | "Is Mobile": 912 | prefix: "useragent6" 913 | body: "rigIsMobile()" 914 | "Is Referral": 915 | prefix: "useragent7" 916 | body: "rigIsReferral()" 917 | "Is Robot": 918 | prefix: "useragent8" 919 | body: "rigIsRobot()" 920 | Join: 921 | prefix: "database30" 922 | body: "rigDbJoin \"${1:table}\", \"${2:condition}\"${3:, \"${4:option}\"${5:, ${6:escape}}}${0}" 923 | "Jquery Add Statement": 924 | prefix: "jquery1" 925 | body: "rigJQaddStatement ${1:statement}${0}" 926 | "Jquery Ajax Form": 927 | prefix: "jquery4" 928 | body: "rigJQajaxForm ${1:submitBtnSelector}, ${2:selectorList}, ${3:postURI}${4:, ${5:preventDefault}}${6:, ${7:dataToLoadURI}}${8:, ${9:dataContainerSelector}}${0}" 929 | "Jquery Ajax": 930 | prefix: "jquery2" 931 | body: "rigJQajax ${1:ajaxOptions}${2:, ${3:setUpOnly}}${0}" 932 | "Jquery AjaxR": 933 | prefix: "jquery3" 934 | body: "rigJQajaxR(${1:ajaxOptions}${2:, ${3:setUpOnly}})${0}" 935 | "Jquery Alert": 936 | prefix: "jquery5" 937 | body: "rigJQalert ${1:alert}${0}" 938 | "Jquery AlertR": 939 | prefix: "jquery6" 940 | body: "rigJQalertR(${1:alert})${0}" 941 | "Jquery Animate": 942 | prefix: "jquery7" 943 | body: "rigJQanimate ${1:selector}, ${2:properties}${3:, ${4:duration}}${5:, ${6:easing}}${7:, ${8:callback}}${0}" 944 | "Jquery AnimateR": 945 | prefix: "jquery8" 946 | body: "rigJQanimateR(${1:selector}, ${2:properties}${3:, ${4:duration}}${5:, ${6:easing}}${7:, ${8:callback}})${0}" 947 | "Jquery CB": 948 | prefix: "jquery10" 949 | body: "rigJQcb" 950 | "Jquery Call Function": 951 | prefix: "jquery9" 952 | body: "rigJQcallFunction ${1:selector}${2:, ${3:functionName}}${4:, ${5:funtionArguments}}${0}" 953 | "Jquery Close": 954 | prefix: "jquery11" 955 | body: "rigJQclose" 956 | "Jquery Condition": 957 | prefix: "jquery12" 958 | body: "rigJQcondition ${1:condition}, ${2:ifAction}${3:, ${4:elseAction}}${0}" 959 | "Jquery ConditionR": 960 | prefix: "jquery13" 961 | body: "rigJQconditionR(${1:condition}, ${2:ifAction}${3:, ${4:elseAction}})${0}" 962 | "Jquery Confirm": 963 | prefix: "jquery14" 964 | body: "rigJQconfirm ${1:varName}, ${2:question}, ${3:global}${0}" 965 | "Jquery ConfirmR": 966 | prefix: "jquery15" 967 | body: "rigJQconfirmR(${1:varName}, ${2:question}, ${3:global})${0}" 968 | "Jquery Each Close": 969 | prefix: "jquery16" 970 | body: "rigJQeachClose" 971 | "Jquery Each CloseR": 972 | prefix: "jquery17" 973 | body: "rigJQeachCloseR()" 974 | "Jquery Each Open": 975 | prefix: "jquery18" 976 | body: "rigJQeachOpen ${1:selector}${2:, ${3:collection}}, ${4:callback}${0}" 977 | "Jquery Each OpenR": 978 | prefix: "jquery19" 979 | body: "rigJQeachOpenR(${1:selector}${2:, ${3:collection}}, ${4:callback})${0}" 980 | "Jquery Effect": 981 | prefix: "jquery20" 982 | body: "rigJQeffect ${1:selector}, ${2:effect}${3:, ${4:duration}}${5:, ${6:callback}}${0}" 983 | "Jquery EffectR": 984 | prefix: "jquery21" 985 | body: "rigJQeffectR(${1:selector}, ${2:effect}${3:, ${4:duration}}${5:, ${6:callback}})${0}" 986 | "Jquery Event Alert": 987 | prefix: "jquery22" 988 | body: "rigJQeventAlert ${1:selector}, ${2:event}, ${3:alert}${4:, ${5:preventDefault}}${6:, ${7:eventData}}${0}" 989 | "Jquery Event Anim": 990 | prefix: "jquery23" 991 | body: "rigJQeventAnim ${1:triggerSelector}, ${2:targetSelector}, ${3:event}, ${4:properties}${5:, ${6:duration}}${7:, ${8:easing}}${9:, ${10:callback}}${0}" 992 | "Jquery Event Close": 993 | prefix: "jquery24" 994 | body: "rigJQeventClose" 995 | "Jquery Event Effect": 996 | prefix: "jquery25" 997 | body: "rigJQeventEffect ${1:triggerSelector}, ${2:targetSelector}, ${3:event}, ${4:effect}${5:, ${6:parameter}}${7:, ${8:preventDefault}}${9:, ${10:callback}}${0}" 998 | "Jquery Event Open": 999 | prefix: "jquery26" 1000 | body: "rigJQeventOpen ${1:selector}, ${2:event}${3:, ${4:preventDefault}}${5:, ${6:eventData}}${7:, ${8:eventObject}}${9:, ${10:functionArguments}}${0}" 1001 | "Jquery Function Close": 1002 | prefix: "jquery27" 1003 | body: "rigJQfunctionClose" 1004 | "Jquery Function Open": 1005 | prefix: "jquery28" 1006 | body: "rigJQfunctionOpen ${1:name}${2:, ${3:arguments}}${0}" 1007 | "Jquery Library": 1008 | prefix: "jquery0" 1009 | body: "rigLoaderLoadLibrary \"Jquery\"${1:, ${2:settings}}${0}" 1010 | "Jquery Open": 1011 | prefix: "jquery29" 1012 | body: "rigJQopen" 1013 | "Jquery Prompt": 1014 | prefix: "jquery30" 1015 | body: "rigJQprompt ${1:varName}, ${2:prompt}${3:, ${4:default}}${5:, ${6:global}}${0}" 1016 | "Jquery PromptR": 1017 | prefix: "jquery31" 1018 | body: "rigJQpromptR(${1:varName}, ${2:prompt}${3:, ${4:default}}${5:, ${6:global}})${0}" 1019 | "Jquery Set": 1020 | prefix: "jquery32" 1021 | body: "rigJQset ${1:selector}, ${2:method}, ${3:propertyValues}${4:, ${5:function}}${6:, ${7:toggleClassSwitch}}${0}" 1022 | "Jquery SetR": 1023 | prefix: "jquery33" 1024 | body: "rigJQsetR(${1:selector}, ${2:method}, ${3:propertyValues}${4:, ${5:function}}${6:, ${7:toggleClassSwitch}})${0}" 1025 | "Jquery Source": 1026 | prefix: "jquery34" 1027 | body: "rigJQuerySource()" 1028 | "Jquery Var": 1029 | prefix: "jquery35" 1030 | body: "rigJQvar ${1:vars}${0}" 1031 | "Jquery XH Request": 1032 | prefix: "jquery36" 1033 | body: "rigJQxhRequest ${1:type}${2:, ${3:URI}}${4:, ${5:data}}${6:, ${7:callback}}${8:, ${9:dataType}}${10:, ${11:selector}}${0}" 1034 | "Jquery XH RequestR": 1035 | prefix: "jquery37" 1036 | body: "rigJQxhRequestR(${1:type}${2:, ${3:URI}}${4:, ${5:data}}${6:, ${7:callback}}${8:, ${9:dataType}}${10:, ${11:selector}})${0}" 1037 | "Keep Flash Data": 1038 | prefix: "session3" 1039 | body: "rigKeepSessFlashdata ${1:\"${2:item}\"}${0}" 1040 | "Known Fonts": 1041 | prefix: "image4" 1042 | body: "rigIMknownFonts()" 1043 | "Lang Text Line": 1044 | prefix: "language3" 1045 | body: "rigLangLine(\"${1:key}\"${2:, \"${3:form_item_id}\"})${0}" 1046 | "Load Language": 1047 | prefix: "language0" 1048 | body: "rigLangLoadLang(\"${1:fileName}\"${2:, \"${3:language}\"})${0}" 1049 | "Language Line": 1050 | prefix: "language1" 1051 | body: "rigLangLangLine(\"${1:languageKey}\")${0}" 1052 | "Last Query": 1053 | prefix: "database31" 1054 | body: "rigDbLastQuery()" 1055 | "Like Array": 1056 | prefix: "database33" 1057 | body: "rigDbLike ${1:array}${0}" 1058 | Like: 1059 | prefix: "database32" 1060 | body: "rigDbLike \"${1:field}\", \"${2:match}\"${3:, \"${4:wildcardPosition}\"}${0}" 1061 | Limit: 1062 | prefix: "database34" 1063 | body: "rigDbLimit ${1:limit}${2:, ${3:offset}}${0}" 1064 | "List Fields": 1065 | prefix: "database35" 1066 | body: "rigDbListFields(\"${1:table}\")${0}" 1067 | "List Tables": 1068 | prefix: "database36" 1069 | body: "rigDbListTables()" 1070 | "Load Array Helper": 1071 | prefix: "array0" 1072 | body: "rigLoadHelper \"array\"${0}" 1073 | "Load Asset Helper": 1074 | prefix: "asset0" 1075 | body: "rigLoadHelper \"asset\"${0}" 1076 | "Load Config": 1077 | prefix: "loader0" 1078 | body: "rigLoadConfig \"${1:fileName}\"${0}" 1079 | "Load Cookie Helper": 1080 | prefix: "cookie0" 1081 | body: "rigLoadHelper \"cookie\"${0}" 1082 | "Load Database": 1083 | prefix: "loader1" 1084 | body: "get rigLoadDatabase(${1: \"${2:groupName}\"${3:, ${4:returnID}${5:, ${6:enableActiveRec}}}})${0}" 1085 | "Load Date Helper": 1086 | prefix: "date0" 1087 | body: "rigLoadHelper \"date\"${0}" 1088 | "Load Download Helper": 1089 | prefix: "download0" 1090 | body: "rigLoadHelper \"download\"${0}" 1091 | "Load Email Helper": 1092 | prefix: "email17" 1093 | body: "rigLoadHelper \"email\"${0}" 1094 | "Load File Helper": 1095 | prefix: "file0" 1096 | body: "rigLoadHelper \"file\"${0}" 1097 | "Load File": 1098 | prefix: "loader2" 1099 | body: "rigLoadFile(\"${1:filepath/filename}\"${2:, ${3:returnData}})${0}" 1100 | "Load Form Helper": 1101 | prefix: "form0" 1102 | body: "rigLoadHelper \"form\"${0}" 1103 | "Load Form-Mail Helper": 1104 | prefix: "formmail0" 1105 | body: "rigLoadHelper \"formmail\"${0}" 1106 | "Load Galleria Plugin": 1107 | prefix: "galleria0" 1108 | body: "rigLoadPlugin \"galleria\"${0}" 1109 | "Load HTML Helper": 1110 | prefix: "html0" 1111 | body: "rigLoadHelper \"html\"${0}" 1112 | "Load JWT Helper": 1113 | prefix: "jwt0" 1114 | body: "rigLoadHelper \"jwt\"${0}" 1115 | "JWT Decode": 1116 | prefix: "jwt1" 1117 | body: "rigJWTdecode(${1:token}${2:, ${3:256}})${0}" 1118 | "JWT Encode": 1119 | prefix: "jwt2" 1120 | body: "rigJWTencode(${1:${2:header}}, ${3:payload}${4:, ${5:256}})${0}" 1121 | "Load Extension": 1122 | prefix: "loader11" 1123 | body: "rigLoadExtension \"${1:name}\"${2:, \"${3:module}\"}${0}" 1124 | "Load Helper": 1125 | prefix: "loader3" 1126 | body: "rigLoadHelper \"${1:name}\"${2:, \"${3:module}\"}${0}" 1127 | "Loader Load Language": 1128 | prefix: "loader4" 1129 | body: "rigLoadLanguage \"${1:fileName}\", \"${2:language}\"${0}" 1130 | "Load Language Helper": 1131 | prefix: "language2" 1132 | body: "rigLoadHelper \"language\"${0}" 1133 | "Load Library": 1134 | prefix: "loader5" 1135 | body: "rigLoaderLoadLibrary \"${1:libraryName}\"${2:, ${3:configArray}${4:, \"${5:module}\"}}${0}" 1136 | "Load Markdown Plugin": 1137 | prefix: "markdown0" 1138 | body: "rigLoadPlugin \"markdown\"${0}" 1139 | "Load Model": 1140 | prefix: "loader6" 1141 | body: "rigLoadModel \"${1:model}\"${2:, ${3:dbConnection}${4:, \"${5:module}\"}}${0}" 1142 | "Load Plugin": 1143 | prefix: "loader7" 1144 | body: "rigLoadPlugin \"${1:name}\"${2:, \"${3:module}\"}${0}" 1145 | "Load QuerytoJSON Plugin": 1146 | prefix: "querytojson0" 1147 | body: "rigLoadPlugin \"querytojson\"${0}" 1148 | "Load Queryvalues Plugin": 1149 | prefix: "queryvalues0" 1150 | body: "rigLoadPlugin \"queryvalues\"${0}" 1151 | "Load Scaffolding": 1152 | prefix: "loader8" 1153 | body: "rigLoadScaffolding \"${1:table}\"${0}" 1154 | "Load Sitelinks Plugin": 1155 | prefix: "sitelinks0" 1156 | body: "rigLoadPlugin \"sitelinks\"${0}" 1157 | "Load Stack": 1158 | prefix: "loader9" 1159 | body: "rigLoadStack \"${1:stackName}\"${2:, ${3:configArray}${4:, \"${5:front}\"${6:, \"${7:module}\"}}}${0}" 1160 | "Load String Helper": 1161 | prefix: "string0" 1162 | body: "rigLoadHelper \"string\"${0}" 1163 | "Load URL Helper": 1164 | prefix: "url0" 1165 | body: "rigLoadHelper \"url\"${0}" 1166 | "Load View": 1167 | prefix: "loader10" 1168 | body: "rigLoadView(\"${1:view}\"${2:, ${3:returnData}})${0}" 1169 | "Load XML Helper": 1170 | prefix: "xml0" 1171 | body: "rigLoadHelper \"xml\"${0}" 1172 | "Log Message": 1173 | prefix: "log" 1174 | body: "rigLogMessage \"${1:level}\", \"${2:message}\"${3:, ${4:displayError}}${0}" 1175 | "Make Table Columns": 1176 | prefix: "table5" 1177 | body: "rigMakeTableColumns(${1:dataArray}, ${2:colNumber})${0}" 1178 | "Mark As Flash Array": 1179 | prefix: "session13" 1180 | body: "rigSessMarkAsFlash ${1:itemsArray}${0}" 1181 | "Mark As Flash": 1182 | prefix: "session12" 1183 | body: "rigSessMarkAsFlash ${1:\"${2:item}\"}${0}" 1184 | "Mark As Temp Array": 1185 | prefix: "session15" 1186 | body: "rigSessMarkAsTemp ${1:itemsArray}${2:, ${3:seconds}}${0}" 1187 | "Mark As Temp": 1188 | prefix: "session14" 1189 | body: "rigSessMarkAsTemp ${1:\"${2:item}\"}${3:, ${4:seconds}}${0}" 1190 | Mark: 1191 | prefix: "benchmark0" 1192 | body: "rigTimeMark \"${1:mark}\"${0:}" 1193 | "Markdown Available": 1194 | prefix: "markdown2" 1195 | body: "rigMarkdownAvailable()" 1196 | "Markdown Version": 1197 | prefix: "markdown3" 1198 | body: "rigMarkdownVersion()" 1199 | Markdown: 1200 | prefix: "markdown1" 1201 | body: "rigMarkdown(${1:tMDstring}${2:, ${3:TRUE}})${0}" 1202 | Message: 1203 | prefix: "email11" 1204 | body: "rigMailMessage \"${1:string}\"${0}" 1205 | "Modules Library": 1206 | prefix: "module0" 1207 | body: "rigLoaderLoadLibrary \"Modules\"" 1208 | "Modules Load": 1209 | prefix: "module1" 1210 | body: "rigLoadModule \"${1:segments}\"${0}" 1211 | "Modules Run": 1212 | prefix: "module2" 1213 | body: "rigRunModule(\"${1:segments}\"${2:, ${3:paramsArray}})${0}" 1214 | "Modules Segment": 1215 | prefix: "module3" 1216 | body: "rigFetchModuleSegment(${1:number}${2:, \"${3:noResultValue}\"})${0}" 1217 | "Modules URIarray": 1218 | prefix: "module4" 1219 | body: "rigModuleUriToAssoc(${1:segmentOffset}, ${2:defaultArray})${0}" 1220 | "New Settings": 1221 | prefix: "image5" 1222 | body: "rigImageNewSettings ${1:settingsArray}" 1223 | "Not Like": 1224 | prefix: "database37" 1225 | body: "rigDbNotLike \"${1:field}\", \"${2:match}\"${3:, \"${4:wildcardPosition}\"}${0}" 1226 | "Number of Fields": 1227 | prefix: "database38" 1228 | body: "rigNumFields()" 1229 | "Number of Rows": 1230 | prefix: "database39" 1231 | body: "rigNumRows()" 1232 | "Or Having Array": 1233 | prefix: "database43" 1234 | body: "rigDbOrHaving ${1:field}${0}" 1235 | "Or Having": 1236 | prefix: "database42" 1237 | body: "rigDbOrHaving \"${1:field}\", \"${2:value}\"${3:, ${4:escaping}}${0}" 1238 | "Or Like": 1239 | prefix: "database44" 1240 | body: "rigDbOrLike \"${1:field}\", \"${2:match}\"${3:, \"${4:wildcardPosition}\"}${0}" 1241 | "Or Not Like": 1242 | prefix: "database45" 1243 | body: "rigDbOrNotLike \"${1:field}\", \"${2:match}\"${3:, \"${4:wildcardPosition}\"}${0}" 1244 | "Or Where Array": 1245 | prefix: "database46" 1246 | body: "rigDbOrWhere ${1:array}${0}" 1247 | "Or Where Custom String": 1248 | prefix: "database47" 1249 | body: "rigDbOrWhere ${1:string}, \"\"${2:, ${3:protect}}${0}" 1250 | "Or Where Custom": 1251 | prefix: "database48" 1252 | body: "rigDbOrWhere \"${1:key} ${2:operator}\", ${3:value}${0}" 1253 | "Or Where In": 1254 | prefix: "database91" 1255 | body: "rigDbWhereIn \"${1:field}\", ${2:itemsArray}${0}" 1256 | "Or Where Not In": 1257 | prefix: "database51" 1258 | body: "rigDbOrWhereNotIn \"${1:field}\", ${2:itemsArray}${0}" 1259 | "Or Where": 1260 | prefix: "database49" 1261 | body: "rigDbOrWhere \"${1:key}\", ${2:value}${0}" 1262 | "Order By String": 1263 | prefix: "database41" 1264 | body: "rigDbOrderBy \"${1:string}\"${0}" 1265 | "Order By": 1266 | prefix: "database40" 1267 | body: "rigDbOrderBy \"${1:field}\", \"${2:direction}\"${0}" 1268 | "Load OTP Helper": 1269 | prefix: "otp0" 1270 | body: "rigLoadHelper \"otp\"${0}" 1271 | "OTP Compare Keys": 1272 | prefix: "otp1" 1273 | body: "rigOTPcompareKeys ${1:\"${2:challenge}\"}, ${3:\"${4:key}\"}${5:, ${6:tokenLength}${7:, ${8:\"${9:cryptoType}\"}${10:, ${11:cryptoNumBits}${12:, ${13:timeStep}${14:, ${15:timeWindow}}}}}}${0}" 1274 | "OTP Generate Password": 1275 | prefix: "otp2" 1276 | body: "rigOTPgenerate ${1:\"${2:secret}\"}${3:, ${4:tokenLength}${5:, ${6:\"${7:cryptoType}\"}${8:, ${9:cryptoNumBits}${10:, ${11:timeStep}${12:, ${13:\"${14:type}\"}}}}}}${0}" 1277 | "OTP Generate User Key": 1278 | prefix: "otp3" 1279 | body: "rigOTPgenerateUserKey ${1:\"${2:secret}\"}${0}" 1280 | "OTP QR Code": 1281 | prefix: "otp4" 1282 | body: "rigOTPqrCode(${1:\"${2:key}\"}, ${3:\"${4:account}\"}, ${5:\"${6:issuer}\"}${7:, ${8:\"${9:algo}\"}${10:, ${11:digits}${12:, ${13:period}${14:, ${15:\"${16:ecc}\"}${17:, ${18:size}${19:, ${20:mask}}}}}}})${0}" 1283 | POST: 1284 | prefix: "input4" 1285 | body: "rigVarPost(\"${1:item}\"${2:, ${3:xssFilter}})${0}" 1286 | "Pagination Library": 1287 | prefix: "pagination0" 1288 | body: "rigLoaderLoadLibrary \"Pagination\"" 1289 | Platform: 1290 | prefix: "database52" 1291 | body: "rigDbPlatform()" 1292 | "Protect Identifiers": 1293 | prefix: "database53" 1294 | body: "rigProtectIdentifiers(\"${1:name}\"${2:, ${3:prefixing}})${0}" 1295 | "Query Binding Array": 1296 | prefix: "database55" 1297 | body: "rigDbQuery(\"${1:query}\", ${2:array})${0}" 1298 | "Query Binding List": 1299 | prefix: "database56" 1300 | body: "rigDbQuery(\"${1:query}\", ${2:list})${0}" 1301 | Query: 1302 | prefix: "database54" 1303 | body: "rigDbQuery(\"${1:query}\")${0}" 1304 | QuerytoJSON: 1305 | prefix: "querytojson1" 1306 | body: "rigQueryToJSON(${1:queryResultArray}${2:, ${3:fieldNamesArray}})${0}" 1307 | Queryvalues: 1308 | prefix: "queryvalues1" 1309 | body: "rigQueryValues(${1:result}${2:, \"${3:keyValueDelimiter}\"${4:, \"${5:recordDelimiter}\"}${6:, ${7:fieldNames}}})${0}" 1310 | "Array Random Element": 1311 | prefix: "array2" 1312 | body: "rigArrayRandElement(${1:array})${0}" 1313 | "File Read Binary": 1314 | prefix: "file2" 1315 | body: "rigReadBinFile(\"${1:path}\")${0}" 1316 | "File Read": 1317 | prefix: "file1" 1318 | body: "rigReadFile(\"${1:path}\")${0}" 1319 | Referrer: 1320 | prefix: "useragent9" 1321 | body: "rigReferrer()" 1322 | ReplyTo: 1323 | prefix: "email12" 1324 | body: "rigReplyTo \"${1:address}\", \"${2:name}\"${0}" 1325 | Result: 1326 | prefix: "database57" 1327 | body: "rigDBresult()" 1328 | "Row Current": 1329 | prefix: "database59" 1330 | body: "rigDbCurrentRow()" 1331 | "Row First": 1332 | prefix: "database60" 1333 | body: "rigDbFirstRow()" 1334 | "Row Last": 1335 | prefix: "database61" 1336 | body: "rigDbLastRow()" 1337 | "Row Next": 1338 | prefix: "database62" 1339 | body: "rigDbNextRow()" 1340 | "Row Previous": 1341 | prefix: "database63" 1342 | body: "rigDbPreviousRow()" 1343 | Row: 1344 | prefix: "database58" 1345 | body: "rigDbRow(${1:${2:rowNumber}})${0}" 1346 | "Sanitize Filename": 1347 | prefix: "input5" 1348 | body: "rigSanitizeFilename(${1:fileName}${2:, ${3:relativePath}})${0}" 1349 | "Segment Array Routed": 1350 | prefix: "uri4" 1351 | body: "rigRSegmentArray()" 1352 | "Segment Array": 1353 | prefix: "uri3" 1354 | body: "rigSegmentArray()" 1355 | "Select Avg": 1356 | prefix: "database65" 1357 | body: "rigSelectAvg \"${1:field}\"${2:, \"${3:resultName}\"}${0}" 1358 | "Select Max": 1359 | prefix: "database66" 1360 | body: "rigSelectMax \"${1:field}\"${2:, \"${3:resultName}\"}${0}" 1361 | "Select Min": 1362 | prefix: "database67" 1363 | body: "rigSelectMin \"${1:field}\"${2:, \"${3:resultName}\"}${0}" 1364 | "Select Sum": 1365 | prefix: "database68" 1366 | body: "rigSelectSum \"${1:field}\"${2:, \"${3:resultName}\"}${0}" 1367 | Select: 1368 | prefix: "database64" 1369 | body: "rigDbSelect \"${1:list}\"${2:, ${3:backticks}}${0}" 1370 | Send: 1371 | prefix: "email13" 1372 | body: "rigMailSend()" 1373 | Server: 1374 | prefix: "input7" 1375 | body: "rigVarServer(\"${1:item}\"${2:, ${3:xssFilter}})${0}" 1376 | "Session Create": 1377 | prefix: "session16" 1378 | body: "rigSessCreate" 1379 | "Session Destroy": 1380 | prefix: "session1" 1381 | body: "rigSessDestroy" 1382 | "Session Library": 1383 | prefix: "session0" 1384 | body: "rigLoaderLoadLibrary \"Session\"" 1385 | "Set Checkbox": 1386 | prefix: "formvalidation4" 1387 | body: "rigSetCheckbox(\"${1:checkbox}[]\", \"${2:value}\"${3:, ${4:default}})${0}" 1388 | "Set Cipher": 1389 | prefix: "encrypt3" 1390 | body: "rigSetCipher \"${1:name}\", ${2:keyLength} ${0}" 1391 | "Set Empty Cel Value": 1392 | prefix: "table6" 1393 | body: "rigSetEmptyCellVal \"${1:value}\"" 1394 | "Set Error Delimiters": 1395 | prefix: "formvalidation5" 1396 | body: "rigSetErrorDelimiters \"${1:delimStart}\", \"${2:delimEnd}\"${0}" 1397 | "Set Flash Data Array": 1398 | prefix: "session4" 1399 | body: "rigSetSessFlashdata ${1:dataArray}${0}" 1400 | "Set Flash Data": 1401 | prefix: "session5" 1402 | body: "rigSetSessFlashdata ${1:\"${2:item}\"}, ${3:\"${4:value}\"}${0}" 1403 | "Set Header": 1404 | prefix: "output3" 1405 | body: "rigSetHeader \"${1:header}\"${0}" 1406 | "Set Item": 1407 | prefix: "config2" 1408 | body: "rigSetConfigItem \"${1:item}\", \"${2:value}\"${0}" 1409 | "Set Message": 1410 | prefix: "formvalidation6" 1411 | body: "rigSetMessage \"${1:rule}\", \"${2:errorMessage}\"${0}" 1412 | "Set Output": 1413 | prefix: "output4" 1414 | body: "rigSetOutput ${1:data}${0}" 1415 | "Set Prefilled Values": 1416 | prefix: "formvalidation14" 1417 | body: "rigSetPrefilledValues ${1:arrayOrList}${0}" 1418 | "Set Radio": 1419 | prefix: "formvalidation7" 1420 | body: "rigSetRadio(\"${1:radio}\", \"${2:value}\"${3:, ${4:default}})${0}" 1421 | "Set Rules Array": 1422 | prefix: "formvalidation8" 1423 | body: "rigSetRules ${1:rulesDataArray}${0}" 1424 | "Set Rules": 1425 | prefix: "formvalidation9" 1426 | body: "rigSetRules \"${1:fieldName}\", \"${2:lang:}${3:humanName}\", \"${4:rules}\"${0}" 1427 | "Set Select": 1428 | prefix: "formvalidation10" 1429 | body: "rigSetSelect(\"${1:selectMenu}\", \"${2:value}\"${3:, ${4:default}})${0}" 1430 | "Set Status Header": 1431 | prefix: "output5" 1432 | body: "rigSetStatusHeader ${1:code}, \"${2:text}\"${0}" 1433 | "Set Table Caption": 1434 | prefix: "table7" 1435 | body: "rigSetTableCaption \"${1:caption}\"" 1436 | "Set Table Heading Array": 1437 | prefix: "table8" 1438 | body: "rigSetTableHeading ${1:array}${2:, ${3:bool}}${0}" 1439 | "Set Table Heading": 1440 | prefix: "table9" 1441 | body: "rigSetTableHeading \"${1:list}\"${2:, ${3:bool}}${0}" 1442 | "Set Table Template": 1443 | prefix: "table10" 1444 | body: "rigSetTableTemplate ${1:array}" 1445 | "Set Temp Data Array": 1446 | prefix: "session18" 1447 | body: "rigSetSessTempdata ${1:dataArray}${2:, , ${3:seconds}}${0}" 1448 | "Set Temp Data": 1449 | prefix: "session17" 1450 | body: "rigSetSessTempdata ${1:\"${2:item}\"}, ${3:\"${4:value}\"}${5:, ${6:seconds}}${0}" 1451 | "Set User Data Array": 1452 | prefix: "session6" 1453 | body: "rigSetSessUserdata ${1:dataArray}${0}" 1454 | "Set User Data": 1455 | prefix: "session7" 1456 | body: "rigSetSessUserdata ${1:\"${2:name}\"}, ${3:\"${4:value}\"}${0}" 1457 | "Set Value": 1458 | prefix: "formvalidation11" 1459 | body: "rigSetValue(\"${1:fieldName}\", \"${2:value}\")${0}" 1460 | "SQL DateTime to Internet Date": 1461 | prefix: "database93" 1462 | body: "rigSqlDateTimeToIntDate(\"${1:datetime}\")${0}" 1463 | "Show 404": 1464 | prefix: "show404" 1465 | body: "rigShow404 \"${1:page}\"${0}" 1466 | "Show Error": 1467 | prefix: "showerror" 1468 | body: "rigShowError \"${1:message}\"${2:, ${3:statusCode}}${0}" 1469 | "Simple Query": 1470 | prefix: "database69" 1471 | body: "rigDbSimpleQuery(\"${1:query}\")${0}" 1472 | "Site URL": 1473 | prefix: "config3" 1474 | body: "rigSiteURL()" 1475 | Sitelinks: 1476 | prefix: "sitelinks1" 1477 | body: "rigSiteLinks(${1:links}, \"${2:currentPage}\", \"${3:seperator}\", \"${4:selector}\")${0}" 1478 | "Slash Segment Routed": 1479 | prefix: "uri5" 1480 | body: "rigSlashRsegment(${1:segmentNumber}${2:, \"${3:where}\"})${0}" 1481 | "Slash Segment": 1482 | prefix: "uri6" 1483 | body: "rigSlashSegment(${1:segmentNumber}${2:, \"${3:where}\"})${0}" 1484 | "Start Cache": 1485 | prefix: "database70" 1486 | body: "rigDbStartCache" 1487 | "Stop Cache": 1488 | prefix: "database71" 1489 | body: "rigDbStopCache" 1490 | "String Alternator": 1491 | prefix: "string2" 1492 | body: "rigAlternator(${1:parameters})${0}" 1493 | "String Quotes to Entities": 1494 | prefix: "string7" 1495 | body: "rigQuotesToEntities(${1:string})${0}" 1496 | "String Random": 1497 | prefix: "string1" 1498 | body: "rigRandomString(\"${1:type}\", ${2:number})${0}" 1499 | "String Reduce Double Slashes": 1500 | prefix: "string4" 1501 | body: "rigReduceDoubleSlashes(${1:string})${0}" 1502 | "String Reduce Multiples": 1503 | prefix: "string6" 1504 | body: "rigReduceMultiples(${1:string}, \"${2:char}\"${3:, ${4:bool}})${0}" 1505 | "String Repeater": 1506 | prefix: "string3" 1507 | body: "rigRepeater(${1:string}, ${2:number})${0}" 1508 | "String Strip Quotes": 1509 | prefix: "string8" 1510 | body: "rigStripQuotes(${1:string})${0}" 1511 | "String Trim Slashes": 1512 | prefix: "string5" 1513 | body: "rigTrimSlashes(${1:string})${0}" 1514 | Subject: 1515 | prefix: "email14" 1516 | body: "rigMailSubject \"${1:string}\"${0}" 1517 | "File Symbolic Permissions": 1518 | prefix: "file9" 1519 | body: "rigSymbolicPermissions(${1:octalValue})${0}" 1520 | "System URL": 1521 | prefix: "config4" 1522 | body: "rigSystemURL()" 1523 | "Table Exists": 1524 | prefix: "database72" 1525 | body: "rigDbTableExists(\"${1:table}\")${0}" 1526 | "Temp Data": 1527 | prefix: "session19" 1528 | body: "rigSessTempdata(${1:\"${2:item}\"})${0}" 1529 | "To Array": 1530 | prefix: "email15" 1531 | body: "rigMailTo ${1:addressesArray}${0}" 1532 | To: 1533 | prefix: "email16" 1534 | body: "rigMailTo \"${1:address(list)}\"${0}" 1535 | "Total Segments Routed": 1536 | prefix: "uri8" 1537 | body: "rigTotalRsegments()" 1538 | "Total Segments": 1539 | prefix: "uri7" 1540 | body: "rigTotalSegments()" 1541 | "Trackback Data": 1542 | prefix: "trackback1" 1543 | body: "rigTrackbackData(\"${1:item}\")${0}" 1544 | "Trackback Display Errors": 1545 | prefix: "trackback2" 1546 | body: "rigTrackbackDisplayErrors(${1:\"${2:openTag}\", \"${3:closeTag}\"})${0}" 1547 | "Trackback Has Link": 1548 | prefix: "trackback3" 1549 | body: "rigTrackbackHasLink(${1:trackbackURL}, ${2:entryURL})${0}" 1550 | "Trackback Library": 1551 | prefix: "trackback0" 1552 | body: "rigLoaderLoadLibrary \"Trackback\"" 1553 | "Trackback Receive": 1554 | prefix: "trackback4" 1555 | body: "rigTrackbackReceive()" 1556 | "Trackback Send Error": 1557 | prefix: "trackback6" 1558 | body: "rigTrackbackSendError \"${1:error}\"${0}" 1559 | "Trackback Send Success": 1560 | prefix: "trackback7" 1561 | body: "rigTrackbackSendSuccess" 1562 | "Trackback Send": 1563 | prefix: "trackback5" 1564 | body: "rigTrackbackSend(${1:array})${0}" 1565 | "Transaction Begin": 1566 | prefix: "database73" 1567 | body: "rigTransBegin()" 1568 | "Transaction Commit": 1569 | prefix: "database74" 1570 | body: "rigTransCommit" 1571 | "Transaction Complete": 1572 | prefix: "database75" 1573 | body: "rigTransComplete()" 1574 | "Transaction Off": 1575 | prefix: "database76" 1576 | body: "rigDbTransOff" 1577 | "Transaction Rollback": 1578 | prefix: "database77" 1579 | body: "rigTransRollback" 1580 | "Transaction Start": 1581 | prefix: "database78" 1582 | body: "rigDbTransStart${1: ${2:testMode}}${0}" 1583 | "Transaction Status": 1584 | prefix: "database79" 1585 | body: "rigDbTransStatus()" 1586 | "Transaction Strict": 1587 | prefix: "database80" 1588 | body: "rigDbTransStrict ${1:bool}" 1589 | Truncate: 1590 | prefix: "database81" 1591 | body: "rigDbTruncate(\"${1:table}\")${0}" 1592 | "URI String Routed": 1593 | prefix: "uri10" 1594 | body: "rigRuriString()" 1595 | "URI String": 1596 | prefix: "uri9" 1597 | body: "rigUriString()" 1598 | "URI to Assoc Routed": 1599 | prefix: "uri12" 1600 | body: "rigRuriToAssoc(${1:offset}${2:, ${3:defaultSegmentsList}})${0}" 1601 | "URI to Assoc": 1602 | prefix: "uri11" 1603 | body: "rigUriToAssoc(${1:offset}${2:, ${3:defaultSegmentsList}})${0}" 1604 | "URL Anchor Popup": 1605 | prefix: "url8" 1606 | body: "rigAnchor(${1:\"${2:URI}\"${3:, \"${4:Title}\"${5:, ${6:Attributes}}}})${0}" 1607 | "URL Autolink": 1608 | prefix: "url11" 1609 | body: "rigAutoLink(${1:string}, \"${2:type}\"${3:, ${4:bool}})${0}" 1610 | "URL Base URL": 1611 | prefix: "url3" 1612 | body: "rigBaseURL()${0}" 1613 | "URL Current URI": 1614 | prefix: "url5" 1615 | body: "rigCurrentURIstring()${0}" 1616 | "URL Current URL": 1617 | prefix: "url4" 1618 | body: "rigCurrentURL()${0}" 1619 | "URL Index": 1620 | prefix: "url6" 1621 | body: "rigIndexPage()${0}" 1622 | "URL Mail to Safe": 1623 | prefix: "url10" 1624 | body: "rigSafeMailToLink(${1:\"${2:address}\"${3:, \"${4:text}\"${5:, ${6:Attributes}}}})${0}" 1625 | "URL Mail to": 1626 | prefix: "url9" 1627 | body: "rigMailToLink(${1:\"${2:address}\"${3:, \"${4:text}\"${5:, ${6:Attributes}}}})${0}" 1628 | "URL Redirect": 1629 | prefix: "url14" 1630 | body: "rigRedirect \"${1:URI}\"${2:, \"${3:refresh}\"${4:, ${5:responseCode}}}${0}" 1631 | "URL Site URL Array": 1632 | prefix: "url1" 1633 | body: "rigASiteURL(${1:segmentsArray})${0}" 1634 | "URL Site URL": 1635 | prefix: "url2" 1636 | body: "rigASiteURL(\"${1:URI}\")${0}" 1637 | "URL Strip Space": 1638 | prefix: "url15" 1639 | body: "rigUrlStripSpace(${1:url}${2:, ${3:replacement}})${0}" 1640 | "URL URL Prep": 1641 | prefix: "url13" 1642 | body: "rigUrlPrep(${1:URL}${2:, ${3:true}})${0}" 1643 | "URL URL Title": 1644 | prefix: "url12" 1645 | body: "rigUrlTitle(${1:title}${2:, \"${3:underscore}\"${4:, ${5:bool}}})${0}" 1646 | "Unset User Data Array": 1647 | prefix: "session9" 1648 | body: "rigUnsetSessUserdata ${1:itemsArray}${0}" 1649 | "Unset User Data": 1650 | prefix: "session10" 1651 | body: "rigUnsetSessUserdata ${1:\"${2:item}\"}${0}" 1652 | Update: 1653 | prefix: "database82" 1654 | body: "rigDbUpdate(\"${1:table}\", ${2:data}${3:, ${4:where}})${0}" 1655 | Updatestring: 1656 | prefix: "database83" 1657 | body: "rigDbUpdateString(\"${1:table}\", ${2:data}, ${3:where})${0}" 1658 | "User Agent Library": 1659 | prefix: "useragent0" 1660 | body: "rigLoaderLoadLibrary \"Useragent\"" 1661 | "User Agent": 1662 | prefix: "input8" 1663 | body: "rigUserAgent()" 1664 | "User Data": 1665 | prefix: "session11" 1666 | body: "rigSessUserdata(${1:\"${2:item}\"})${0}" 1667 | "Valid IP": 1668 | prefix: "input9" 1669 | body: "rigValidIP(${1:ip}${2:, \"${3:IPv}\"})${0}" 1670 | "Validation Errors": 1671 | prefix: "formvalidation12" 1672 | body: "rigValidationErrors(${1:\"${2:delimStart}\", \"${3:delimEnd}\"})${0}" 1673 | "Validation Run": 1674 | prefix: "formvalidation13" 1675 | body: "rigFormValidRun(${1:\"${2:ruleGroup}\"})${0}" 1676 | "Values Set Array": 1677 | prefix: "database84" 1678 | body: "rigDbValuesSet(${1:array})${0}" 1679 | "Values Set": 1680 | prefix: "database85" 1681 | body: "rigDbValuesSet(\"${1:field}\", ${2:value}${3:, ${4:escaping}})${0}" 1682 | Version: 1683 | prefix: "database86" 1684 | body: "rigDbVersion()" 1685 | Watermark: 1686 | prefix: "image9" 1687 | body: "rigImageWatermark()" 1688 | "Where Array": 1689 | prefix: "database87" 1690 | body: "rigDbWhere ${1:array}${0}" 1691 | "Where Custom String": 1692 | prefix: "database88" 1693 | body: "rigDbWhere ${1:string}, \"\"${2:, ${3:protect}}${0}" 1694 | "Where Custom": 1695 | prefix: "database89" 1696 | body: "rigDbWhere \"${1:key} ${2:operator}\", ${3:value}${0}" 1697 | "Where In": 1698 | prefix: "database50" 1699 | body: "rigDbOrWhereIn \"${1:field}\", ${2:itemsArray}${0}" 1700 | "Where Not In": 1701 | prefix: "database92" 1702 | body: "rigDbWhereNotIn \"${1:field}\", ${2:itemsArray}${0}" 1703 | Where: 1704 | prefix: "database90" 1705 | body: "rigDbWhere \"${1:key}\", ${2:value}${0}" 1706 | "File Write": 1707 | prefix: "file3" 1708 | body: "rigWriteFile(\"${1:path}\", ${2:data})${0}" 1709 | "XML Convert": 1710 | prefix: "xml1" 1711 | body: "rigXmlConvert(${1:string})${0}" 1712 | "XSS Clean": 1713 | prefix: "input10" 1714 | body: "rigXssClean(${1:data}${2:, ${3:imageTest}})${0}" 1715 | -------------------------------------------------------------------------------- /tools/GenerateSnippets.livecodescript: -------------------------------------------------------------------------------- 1 | script "GenerateSnippets" 2 | constant kBaseIndent = " " 3 | constant kIndent = " " 4 | 5 | on preOpenStack 6 | set the visible of me to true 7 | create btn "Generate Snippets" 8 | set the rect of it to "10,10,124,33" 9 | end preOpenStack 10 | 11 | on mouseUp 12 | if the short name of the target is "Generate Snippets" then 13 | put kBaseIndent & "builtins:" & cr & \ 14 | kBaseIndent & kIndent & "suggestions: [" into theSnippets 15 | 16 | # functions 17 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/function" 18 | repeat for each line theFile in the files 19 | put url ("file:"&theFile) into theDoc 20 | put GetDescription(theDoc) into theDescription 21 | filter theDoc with "Syntax: *" 22 | repeat for each line theSyntax in theDoc 23 | delete word 1 of theSyntax 24 | replace "[" with empty in theSyntax 25 | replace "]" with empty in theSyntax 26 | 27 | -- parameters 28 | put empty into theFunctionName 29 | put empty into theParameters 30 | if theSyntax contains "(" then 31 | get MatchText(theSyntax,"(?i)^(.*)\((.*)\)",theFunctionName,theParameters) 32 | 33 | if theParameters is empty then 34 | next repeat 35 | end if 36 | 37 | put theFunctionName into thePrefix 38 | 39 | put theFunctionName&"(" into theBody 40 | 41 | if theParameters is not empty then 42 | replace "<" with "" in theParameters 43 | replace ">" with "" in theParameters 44 | split theParameters with comma 45 | repeat with theIndex = 1 to the number of elements of theParameters 46 | split theParameters[theIndex] with "|" 47 | replace space with empty in theParameters[theIndex][1] 48 | put "${"&theIndex&":"&theParameters[theIndex][1]&"}, " after theBody 49 | end repeat 50 | put ")" into char -2 to -1 of theBody 51 | else 52 | put ")" after theBody 53 | end if 54 | 55 | AddSnippet theSnippets, theFunctionName, theBody, "function", theDescription, theFile 56 | 57 | else 58 | 59 | if theSyntax contains "of" then 60 | put word 2 to -4 of theSyntax into theOptions 61 | put word -3 of theSyntax into theFunctionName 62 | put word -1 of theSyntax into theParameter 63 | replace "<" with "" in theParameter 64 | replace ">" with "" in theParameter 65 | put " of ${1:"&theParameter&"}" into theParameter 66 | else 67 | put empty into theParameter 68 | put word 2 to -2 of theSyntax into theOptions 69 | put word -1 of theSyntax into theFunctionName 70 | end if 71 | 72 | if theOptions contains "|" then 73 | split theOptions with "|" 74 | repeat with theIndex = 1 to the number of elements of theOptions 75 | -- trim 76 | put word 1 to -1 of theOptions[theIndex] into theOptions[theIndex] 77 | if theOptions[theIndex] is not empty then 78 | put kIndent after theOptions[theIndex] 79 | end if 80 | AddSnippet theSnippets, theOptions[theIndex] & theFunctionName, theOptions[theIndex] & theFunctionName & theParameter, "function", theDescription, theFile 81 | end repeat 82 | else 83 | if theParameter is empty then 84 | next repeat 85 | end if 86 | end if 87 | end if 88 | end repeat 89 | end repeat 90 | 91 | # messages 92 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/message" 93 | repeat for each line theFile in the files 94 | put url ("file:"&theFile) into theDoc 95 | put GetDescription(theDoc) into theDescription 96 | filter theDoc with "Syntax: *" 97 | repeat for each line theSyntax in theDoc 98 | delete word 1 of theSyntax 99 | replace "<" with "" in theSyntax 100 | replace ">" with "" in theSyntax 101 | put word 1 of theSyntax into theMessageName 102 | put word 2 to -1 of theSyntax into theParameters 103 | put theMessageName into theSyntax 104 | split theParameters by comma 105 | repeat with theIndex = 1 to the number of elements of theParameters 106 | if theParameters[theIndex] contains "|" then 107 | -- unfortunately some of the syntax definitions describe a set of possible values 108 | -- or parameter types and this simplifies things considerably... 109 | put "Value" into theParameter 110 | else 111 | -- trim 112 | put word 1 of theParameters[theIndex] into theParameter 113 | end if 114 | put space & "p" & toUpper(char 1 of theParameter) & char 2 to -1 of theParameter & comma after theSyntax 115 | end repeat 116 | if the last char of theSyntax is comma then 117 | delete the last char of theSyntax 118 | end if 119 | 120 | put theSyntax & cr & space & "${1:/* code */ }" & cr & "end" && theMessageName into theBody 121 | AddSnippet theSnippets, theMessageName & " ... end " & theMessageName, theBody, "message", theDescription, theFile 122 | end repeat 123 | end repeat 124 | 125 | # properties 126 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/property" 127 | repeat for each line theFile in the files 128 | put url ("file:"&theFile) into theDoc 129 | put GetDescription(theDoc) into theDescription 130 | filter theDoc with "Syntax: *" 131 | repeat for each line theSyntax in theDoc 132 | -- strip off set|put the 133 | put word 4 to -1 of theSyntax into theSyntax 134 | put theSyntax into theSnippet 135 | replace "<" with "{" in theSnippet 136 | replace ">" with "}" in theSnippet 137 | replace "{" with "${" in theSnippet 138 | replace "[" with "${" in theSnippet 139 | replace "]" with "}" in theSnippet 140 | replace " | " with "OR" in theSnippet 141 | set the itemDelimiter to "{" 142 | repeat with theIndex = 2 to the number of items of theSnippet 143 | put theIndex-1&":" before item theIndex of theSnippet 144 | end repeat 145 | 146 | 147 | AddSnippet theSnippets, theSyntax, theSnippet, "property", theDescription, theFile 148 | end repeat 149 | end repeat 150 | 151 | # keywords 152 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/keyword" 153 | repeat for each line theFile in the files 154 | put url ("file:"&theFile) into theDoc 155 | put GetDescription(theDoc) into theDescription 156 | filter theDoc with "Syntax: *" 157 | repeat for each line theSyntax in theDoc 158 | -- strip off set|put the 159 | put word 2 to -1 of theSyntax into theSyntax 160 | if theSyntax is "[]" then next repeat 161 | if theSyntax is "\" then next repeat 162 | AddSnippet theSnippets, theSyntax, theSyntax, "keyword", theDescription, theFile 163 | end repeat 164 | end repeat 165 | 166 | # constants 167 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/constant" 168 | repeat for each line theFile in the files 169 | put url ("file:"&theFile) into theDoc 170 | put GetDescription(theDoc) into theDescription 171 | filter theDoc with "Syntax: *" 172 | repeat for each line theSyntax in theDoc 173 | -- strip off set|put the 174 | put word 2 to -1 of theSyntax into theSyntax 175 | AddSnippet theSnippets, theSyntax, theSyntax, "constant", theDescription, theFile 176 | end repeat 177 | end repeat 178 | 179 | # objects 180 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/object" 181 | repeat for each line theFile in the files 182 | put url ("file:"&theFile) into theDoc 183 | put GetDescription(theDoc) into theDescription 184 | filter theDoc with "Syntax: *" 185 | repeat for each line theSyntax in theDoc 186 | -- strip off set|put the 187 | put word 2 to -1 of theSyntax into theSyntax 188 | AddSnippet theSnippets, theSyntax, theSyntax, "object", theDescription, theFile 189 | end repeat 190 | end repeat 191 | 192 | # operators 193 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/operator" 194 | repeat for each line theFile in the files 195 | put url ("file:"&theFile) into theDoc 196 | put GetDescription(theDoc) into theDescription 197 | filter theDoc with "Syntax: *" 198 | repeat for each line theSyntax in theDoc 199 | replace ">" with ">" in theDoc 200 | replace "<:" with "<" in theDoc 201 | put word 3 to -1 of theSyntax into theSyntax 202 | if the number of chars of word 1 of theSyntax is 1 then 203 | next repeat 204 | end if 205 | if the number of chars of word 1 of theSyntax < 5 and the number of words in theSyntax is 2 then 206 | next repeat 207 | end if 208 | repeat for each line theSnippet in ParseSyntaxDefinition(theSyntax) 209 | if theSnippet is empty then next repeat 210 | put 2 into checkAn 211 | if word checkAn of theSnippet is "not" then 212 | add 1 to checkAn 213 | end if 214 | if word checkAn of theSnippet is "an" and char 1 of word checkAn+1 of theSnippet is not among the chars of "aeiou" then 215 | next repeat 216 | end if 217 | if word checkAn of theSnippet is "a" and char 1 of word checkAn+1 of theSnippet is among the chars of "aeiou" then 218 | next repeat 219 | end if 220 | put theSnippet into theParsedSyntax 221 | replace "<" with "${" in theSnippet 222 | replace ">" with "}" in theSnippet 223 | set the itemDelimiter to "{" 224 | repeat with theIndex = 2 to the number of items of theSnippet 225 | put theIndex-1&":" before item theIndex of theSnippet 226 | end repeat 227 | AddSnippet theSnippets, theParsedSyntax, theSnippet, "operator", theDescription, theFile 228 | end repeat 229 | end repeat 230 | end repeat 231 | 232 | # commands 233 | set the folder to specialFolderPath("home") & "/livecode/docs/dictionary/command" 234 | repeat for each line theFile in the files 235 | put url ("file:"&theFile) into theDoc 236 | put GetDescription(theDoc) into theDescription 237 | filter theDoc with "Syntax: *" 238 | repeat for each line theSyntaxDefinition in theDoc 239 | delete word 1 of theSyntaxDefinition 240 | if the number of words of theSyntaxDefinition is 1 then 241 | next repeat 242 | end if 243 | repeat for each line theSyntax in ParseSyntaxDefinition(theSyntaxDefinition) 244 | if theSyntax is empty then next repeat -- not sure why we are geting empty lines 245 | put theSyntax into theParameters 246 | replace "<" with "" in theSyntax 247 | replace ">" with "" in theSyntax 248 | put word 1 to 3 of theSyntax into thePrefix 249 | replace space with empty in thePrefix 250 | 251 | split theParameters with "<" 252 | repeat with theIndex = 1 to the number of elements of theParameters 253 | if theIndex is 1 then 254 | put theParameters[theIndex] into theBody 255 | else 256 | split theParameters[theIndex] with ">" 257 | put "${"&theIndex-1&":"&theParameters[theIndex][1]&"}"&theParameters[theIndex][2] after theBody 258 | end if 259 | end repeat 260 | AddSnippet theSnippets, theSyntax, theBody, "command", theDescription, theFile 261 | end repeat 262 | end repeat 263 | end repeat 264 | 265 | put cr & kBaseIndent & kIndent & "]" & cr & \ 266 | "# GENERATED SNIPPETS END" & cr after theSnippets 267 | 268 | put url ("binfile:"&specialFolderPath("home")&"/atom-language-livecode/settings/language-livecode.cson") into theCSON 269 | put offset(kBaseIndent & "builtins:",theCSON) into theStart 270 | put offset("# GENERATED SNIPPETS END",theCSON) into theEnd 271 | add length("# GENERATED SNIPPETS END") to theEnd 272 | if theStart > 0 and theEnd > 0 then 273 | put theSnippets into char theStart to theEnd of theCSON 274 | else if theStart > 0 then 275 | put theSnippets into char theStart to -1 of theCSON 276 | else 277 | put cr&theSnippets after theCSON 278 | end if 279 | put theCSON into url ("binfile:"&specialFolderPath("home")&"/atom-language-livecode/settings/language-livecode.cson") 280 | end if 281 | end mouseUp 282 | 283 | function GetDescription pDoc 284 | filter pDoc with "Summary: *" 285 | put word 2 to -1 of line 1 of pDoc into pDoc 286 | replace "'" with "\'" in pDoc 287 | replace quote with "\""e in pDoc 288 | return pDoc 289 | end GetDescription 290 | 291 | function ParseOptionalSyntax pSyntaxDefinition 292 | put 0 into foundStartChar 293 | put 0 into foundEndChar 294 | put offset("[",pSyntaxDefinition,foundStartChar) into foundStartChar 295 | -- answer files broken and making me hit recurstion limits 296 | if char 1 to foundStartChar of pSyntaxDefinition contains "]" then 297 | replace "]" with empty in char 1 to foundStartChar of pSyntaxDefinition 298 | put offset("[",pSyntaxDefinition,0) into foundStartChar 299 | end if 300 | if foundStartChar > 0 then 301 | repeat 302 | put offset("]",pSyntaxDefinition,foundEndChar) into theChar 303 | put foundEndChar + theChar into foundEndChar 304 | if foundEndChar = 0 then 305 | -- unmatched pairs 306 | replace "[" with "" in pSyntaxDefinition 307 | exit repeat 308 | end if 309 | put char foundStartChar+1 to foundEndChar-1 of pSyntaxDefinition into theOption 310 | -- nested optional syntax... 311 | if "[" is not in theOption then 312 | exit repeat 313 | else 314 | -- check for matching pairs 315 | put 0 into theBracketCount 316 | repeat with X = 1 to the number of chars of theOption 317 | if char X of theOption is "[" then 318 | add 1 to theBracketCount 319 | else if char X of theOption is "]" then 320 | subtract 1 from theBracketCount 321 | end if 322 | end repeat 323 | if theBracketCount is 0 then 324 | exit repeat 325 | end if 326 | end if 327 | end repeat 328 | 329 | if foundEndChar <> 0 then 330 | -- we found some optional syntax so we need to split the syntax defintion into two 331 | put pSyntaxDefinition into theOption1 332 | delete char foundEndChar of theOption1 333 | delete char foundStartChar of theOption1 334 | put pSyntaxDefinition into theOption2 335 | delete char foundStartChar to foundEndChar of theOption2 336 | put ParseOptionalSyntax(theOption1) into theOption1 337 | put ParseOptionalSyntax(theOption2) into theOption2 338 | return theOption1 & cr & theOption2 339 | end if 340 | end if 341 | 342 | return pSyntaxDefinition 343 | end ParseOptionalSyntax 344 | 345 | function ParseVariationSyntax pSyntaxDefinition 346 | put 0 into foundStartChar 347 | put 0 into foundEndChar 348 | 349 | put offset("{",pSyntaxDefinition,foundStartChar) into foundStartChar 350 | if foundStartChar <> 0 then 351 | put offset("}",pSyntaxDefinition,foundEndChar) into foundEndChar 352 | if foundEndChar = 0 then 353 | exit repeat 354 | end if 355 | put char foundStartChar+1 to foundEndChar-1 of pSyntaxDefinition into theVariations 356 | 357 | if foundEndChar <> 0 then 358 | -- we found an array of variable syntax 359 | set the itemDelimiter to "|" 360 | repeat for each item theVariation in theVariations 361 | put pSyntaxDefinition into theSyntax 362 | put theVariation into char foundStartChar to foundEndChar of theSyntax 363 | put ParseVariationSyntax(theSyntax) & cr after theSyntaxes 364 | end repeat 365 | return theSyntaxes 366 | end if 367 | end if 368 | return pSyntaxDefinition 369 | end ParseVariationSyntax 370 | 371 | function ParseSyntaxDefinition pSyntaxDefinition 372 | local theSyntaxes 373 | replace "..." with "" in pSyntaxDefinition 374 | 375 | put ParseOptionalSyntax(pSyntaxDefinition) into theSyntaxes 376 | repeat for each line theSyntax in theSyntaxes 377 | put ParseVariationSyntax(theSyntax) & cr after theParsedSyntaxes 378 | end repeat 379 | return theParsedSyntaxes 380 | end ParseSyntaxDefinition 381 | 382 | command AddSnippet @pSnippets, pName, pBody, pType, pDescription, pFile 383 | -- some spacing issues from the syntax parser 384 | replace space & space with space in pBody 385 | if pBody ends with space then 386 | delete the last char of pBody 387 | end if 388 | replace space & space with space in pName 389 | if pName ends with space then 390 | delete the last char of pName 391 | end if 392 | 393 | put kBaseIndent & kIndent & kIndent into tIndent 394 | 395 | put tIndent&"{" & cr into theSnippet 396 | 397 | replace quote with "\""e in pBody 398 | 399 | if the number of lines of pBody > 1 then 400 | put "'''" & cr before pBody 401 | put cr & "'''" after pBody 402 | 403 | repeat with theIndex = 2 to the number of lines of pBody 404 | put tIndent & kIndent before line theIndex of pBody 405 | end repeat 406 | else 407 | put "'" & pBody & "'" into pBody 408 | end if 409 | 410 | # I assume this is based on the lcdoc filename... hope so 411 | set the itemDelimiter to "." 412 | put "https://livecode.com/resources/api/#livecode_script/"&item 1 of pFile into theMoreURL 413 | 414 | put tIndent & kIndent & "type: '" & pType & "'" & cr after theSnippet 415 | put tIndent & kIndent & "snippet: " & pBody & cr after theSnippet 416 | put tIndent & kIndent & "description: '" & pDescription & "'" & cr after theSnippet 417 | put tIndent & kIndent & "descriptionMoreURL: '" & theMoreURL & "'" & cr after theSnippet 418 | 419 | put tIndent&"}" after theSnippet 420 | 421 | put cr & theSnippet after pSnippets 422 | 423 | end AddSnippet 424 | -------------------------------------------------------------------------------- /tools/Linter.lc: -------------------------------------------------------------------------------- 1 |